Timeline for White bars on magento product images with keepFrame(false)
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 22, 2017 at 15:32 | vote | accept | Chris Lingwood | ||
Apr 22, 2017 at 15:32 | answer | added | Chris Lingwood | timeline score: -1 | |
Apr 19, 2017 at 22:52 | history | edited | Chris Lingwood | CC BY-SA 3.0 |
Reflect that I was looking at old code so the problem is different.
|
Apr 19, 2017 at 21:50 | comment | added | Chris Lingwood |
Correct me if I'm wrong but keepFrame(false) should not keep the frame. It shouldn't matter that the aspect ratios don't match, it should just use those as max bounds and scale as far as it can. As it happens I was looking at out of date source code. The block in view.xml has changed from product_page_image_medium to product_page_image_medium_no_frame and constainOnly, keepFrame and keepAspectRatio aren't forced anrymore. The default is loaded from Magento/Blank and defines the troublesome images as 700x700. Unfortunately I've now got white bars top and bottom as well as on the sides.
|
|
Apr 19, 2017 at 21:11 | comment | added | philwinkle | Keep frame keeps the frame. Otherwise it would be cropped to fit the dimensions. Your defined aspect ratio is not the same as the uploaded image. You should crop/resize your images uploaded to fit the .78 aspect ratio you're defining in the code. | |
Apr 19, 2017 at 20:39 | history | edited | Chris Lingwood |
edited tags
|
|
Apr 19, 2017 at 18:42 | history | asked | Chris Lingwood | CC BY-SA 3.0 |