When I am rendering images in my DXA 1.4 views by using
Html.Media(ModelImageField) it is distorting images and creating image with different size in file system and rendering it in view.
I have tried passing width factor as well
Html.Media(ModelImageField, "62"), but seems it is also creating a image of some different size. Then, I have tried it by simply using
<img src="@ModelImageField.Url" />, this is rendering correct size of image.
I have to render images of fixed size in my view. Can anyone suggest if I can get image of specific size by passing some parameter to helper function
Html.Media(ModelImageField, "62")? I have already tried unsuccessfully by passing widthfactor and aspect ratio. Can anyone suggest if I am missing anything. Thanks in advance.
Specific example for issue:
I have a multimedia component with image file (
ZX_series_background_373x140) attached of size 373x140px (width x height). It is exactly same as I have to show in the view.
When I use
Html.Media(ModelImageField) it is creating file with name like
ZX_series_background_373x140_tcm8-112358_w1024_h633_n.jpg of size 227x140px. I am not sure why it is changing width and height of image. I am not sure if I am missing something in parameter. Even when I pass the
WidthFactor as required width (373px) in that case too, name of file changed as
ZX_series_background_373x140_tcm8-112358_w640_h396_n.jpg but size is still same 227x140px.