x

Category Image Sizing

I can see that there is an option to select the aspect ratio of images for products/categories.  

This issue that I have is that I would like the images to be their native ratio as I uploaded them.  Even with 1:1 images that I have uploaded, that are smaller than the designed space I cannot get them to look right as they are expanded to fill the div.

In the page there is a "style" element added like such:  style="width:100%;top:-0%;left:0%;"

Where is this coming from and how do I turn it off?  I would try and override it with CSS but its the top level element.style directly inserted into the <img> tag.

Thanks for any help!

918 Views
Message 1 of 3
Report
1 Best Answer
Square

Best Answer

Those are inline styles applied right to templates we use for category images, although they might be applied on the fly during rendering and not as part of partials. You should be able to override those with an important declaration, though, like this:

width: 300px !important;

View Best Answer >

887 Views
Message 2 of 3
Report
2 REPLIES 2
Square

Best Answer

Those are inline styles applied right to templates we use for category images, although they might be applied on the fly during rendering and not as part of partials. You should be able to override those with an important declaration, though, like this:

width: 300px !important;
888 Views
Message 2 of 3
Report

Thank you, that is very helpful!

868 Views
Message 3 of 3
Report