0

When I upload a product image that is for example 2400px * 2400 px in admin. Magento automatically compress it to 1200px * 1200px. Is it possible to tell Magento not to compress my images?

When searching on google, some articles say in Magento 2.3, it is possible to config image quality in admin, but I couldn't find such settings in admin.

I'm using Magento 2.3.1


update: I have looked in the view.xml, I can find image sizes for thumbnails etc, but I can't find any values like 1200px.

0

You need to set image sizes in view.xml file inside your theme
Find the code where it is setting image size to 1200x1200 and change it with your desired one.

Code would be something like this:

<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="bundled_product_customization_page" type="thumbnail">
                <width>140</width>
                <height>140</height>
            </image>
            <image id="cart_cross_sell_products" type="thumbnail">
                <width>200</width>
                <height>248</height>
            </image>
            <image id="cart_page_product_thumbnail" type="small_image">
                <width>165</width>
                <height>165</height>
            </image>
            ........
        </images>
    </media>
    ......
</view>

Make sure your all images sizes are 1:1 ratio, as your main image proportion is 1:1 in ratio, than after frontend deployment it should work

php bin/magento setup:static-content:deploy -f
|improve this answer|||||
  • I've looked at the view.xml. I did found the different image sizes, like thumbnail and small_image etc. but I can't find anything like 1200px. – Magento Learner Jul 3 '19 at 12:50
  • Then it would be setting in parent theme – Shoaib Munir Jul 3 '19 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.