AVIF format not work correctlty with the img_url filter

Short description of issue

If you upload an image in “avif” format and use the “img_url” filter in the code to display the image, the image will be displayed in low quality, ignoring the parameters for specifying the width or height of the image.

Reproduction steps

  1. Upload an image in the “avif” format in the theme customizer to the “image_picker” setting.
  2. Render this image using “img_url” filter.
  3. Check this image on the website - it will be of very low quality.

Additional info

If you upload the image in a jpeg, webp format, everything will work fine.

What type of topic is this

Bug report

Hey @UTD-Dev

Do you get the same result when using the image_url [1] and image_tag [2] filters?
These have replaced img_url and img_tag, respectively.

{{ product.featured_image | image_url: width: '1800' | image_tag }} for example should work as expected.

Hey @Arthur_Demurger !

With the new filter image_url , the image is displayed correctly.

In our new themes, we use the image_url filter and everything works fine.

But we have an old theme that uses the old img_url filter (the new image_url filter didn’t exist back then).

I understand that one can be replaced with the other. But nowhere in the documentation does it say that the old filter does not work/cannot be used or that it has problems displaying AVIF images. After all, the old filter is available and works for backward compatibility.

Could you please check if it is possible to fix the display of AVIF images for the old img_url filter?

Right now, it looks like a bug.

Up. Can someone check this and tell me if it can be fixed?

@Arthur_Demurger Hello :slightly_smiling_face:
Could you please respond to my current request? Thank you for your attention.

Is anyone from Shopify stuff can help with this please?

Say clearly: no, we won’t fix this. Or yes, we’ll look into it in the future.