- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Magento 2.3.0 product image cache resizing images
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.0 product image cache resizing images
Hello @decornmore ,
Magento stores product images as:
media/catalog/product/<first_letter>/<second_letter>/<image_name>
However when rendering images are resized as required by specific blocks and saved to cache. It's done to improve performance and perform resize operation only once. That is why when your clear cache then the change you have done statically to the file /pub/media/catalog/product/cache/b3b166914d87ce343d4dc5ec5117b502/ is overridden
You can try
In etc/view.xml of your current theme, you can update product image size
Make sure you resize with the expect ratio.
Use additional tag <frame> to prevent white borders on image. Use this code as example:
<image id="product_page_main_image" type="small_image"> <width>460</width> <height>460</height> <aspect_ratio>true</aspect_ratio> <frame>false</frame> </image>
Check all other tags, not just a tag with the id `product_page_main_image` check others too.
Hope it Helps !! Please accept as solution and kudos if it works for you!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.0 product image cache resizing images
Hi,
i have try it and its not working. i have made new test prodact to see how it will look but its not working at all.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.0 product image cache resizing images
this solution (tried to update the etc/view.xml ) i have try over and over again i have try to tried to update the etc/view.xml with different image size and could not solve the issue. I see that the extension of Fotorama used in the product details page can this extension resize the image and white background issue?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.0 product image cache resizing images
no other offer how to solveit?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.0 product image cache resizing images
Hi @decornmore,
Please go thought once magento 2 following document for image thumbnails.
https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-images.html
In this document
All image properties used in view.xml should be listed in the order shown here to prevent a“This element is not expected.”frontend error. The following table contains the list of all properties which can be configured: may help you.
aspect_ratio and constrain property will help you.
For image Properties following document may help you. All properties are described with an example.
https://nwdthemes.com/2017/12/19/magento-2-product-image-size/
I hope it will help you!