magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

[Feature request][Theme] Possibility to set image format for resizes (Webp/Avif/jxl) #37361

Open Nuranto opened 1 year ago

Nuranto commented 1 year ago

Description

In the same spirit of https://github.com/magento/magento2/issues/35836, it would be great to have a new property for images.

Expected behavior

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-images.html

<images module="Magento_Catalog">
    <image id="unique_image_id" type="image">
        <width>100</width> <!-- Image width in px -->
        <height>100</height> <!-- Image height in px -->
        <format>webp</format>
    </image>
</images>

Benefits

Additional information

No response

Release note

No response

m2-assistant[bot] commented 1 year ago

Hi @Nuranto. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

kuafucode commented 1 year ago

Running image encoding on server can be quite resource intensive. If it is to help website migrating from one image format to another, it can be easily done with a simple shell script + image convertor like imagemagick.