cancel
Showing results for 
Search instead for 
Did you mean: 

Product image quality

Product image quality

Hi all

 

I would be very grateful, as a complete novice to Magento 2, if somebody could tell me if and where the phtml? file is to reduce the image upload compression as our images appear blurry / pixelated once uploaded and saved.

 

Any response would be greatly appreciated.

 

 

 

8 REPLIES 8

Re: Product image quality

same here. can´t find an option or documentation here.

pls help!

Re: Product image quality

Anyone!?

Re: Product image quality

In your theme /etc folder you can change the image sizes.

Re: Product image quality

magentoinstall/app/design/frontend/vendor/themename/etc/view.xml

 

Here is a small portion of options, there are many more:

<image id="bundled_product_customization_page" type="thumbnail">
<width>140</width>
<height>140</height>
</image>
<image id="cart_cross_sell_products" type="thumbnail">
<width>152</width>
<height>188</height>
</image>
<image id="cart_page_product_thumbnail" type="small_image">
<width>110</width>
<height>160</height>
</image>
<image id="category_page_grid" type="small_image">
<width>240</width>
<height>300</height>
</image>
<image id="category_page_list" type="small_image">
<width>240</width>

Re: Product image quality

Thanks Liam that's very helpful.  Do you know if there is default compression percentage for all uploaded images as there was with Magento 1?   It seems that every image we upload is compressed at least by 25%.

Re: Product image quality

I'm curious about this too.  My store has a unique product that requires high quality images because they have a ton of detail.  After some research it seems in Magento 1 you did it like this.  

 

echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize(42, 50)->setQuality(95);

 Right now Magento 2 uses pretty heavy compression though it has pretty good results.  I can upload an 800kb JPEG to /media/import/ and it will get reduced to under 200kb.  While it doesn't look bad I'd rather be somewhere in the middle of those two numbers for nice speed/quality ratio.

 

I can't seem to figure out what phtml file and where to add this "->setQuality(95)" in /vendor/magento/module-catalog/view/frontend/templates/product/.

Re: Product image quality

Anyone have any ideas how to change image quality on thumbnails and product images?

Re: Product image quality

This may help:

 

http://magento.stackexchange.com/questions/113165/how-to-increase-the-quality-of-product-photos-jpg-...

 

I can't believe that after ALL THESE YEARS of too aggressive and harsh image compression from M1, this continues with M2. Unacceptable.