0

I'm getting crazy with product image format in the gallery. I have some images that are 1280x1920 px that magento reduces to 800x1200 px. The i set the view.xml file, i cleared the pub cached image folder, gave the command php bin/magento catalog:image:resize and php bin/magento cache:clean, but the image in the gallery is alway 400x700 px and has white borders in the fotorama stage. How can in fix it?

1 Answer 1

1

Go to below path:

Your_Theme/etc/view.xml

Add transparency to false.

<?xml version="1.0"?> <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd"> <media> <images module="Magento_Catalog"> <image id="category_page_list" type="small_image"> <width>240</width> <height>300</height> <transparency>false</transparency> </image> </images> </media> 

Clear Cache and check White frame should be removed.

5
  • it is ok also if the images are jpg and not png? Commented Mar 29, 2018 at 13:23
  • What do you mean by your comment ? Commented Mar 29, 2018 at 13:25
  • Sorry i was thinking about the image alpha channel. That thing it made me crazy, i lost a morning of work trying to fix it Commented Mar 29, 2018 at 13:28
  • If it answer helps you might giving me upvote and accept it to help others !! Good Luck !! Commented Mar 29, 2018 at 13:34
  • not working man. Commented Mar 29, 2018 at 14:06

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.