- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Product image quality
same here. can´t find an option or documentation here.
pls help!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Product image quality
Anyone!?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Product image quality
In your theme /etc folder you can change the image sizes.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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%.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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/.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Product image quality
Anyone have any ideas how to change image quality on thumbnails and product images?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Product image quality
This may help:
I can't believe that after ALL THESE YEARS of too aggressive and harsh image compression from M1, this continues with M2. Unacceptable.