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
Upload an image in the “avif” format in the theme customizer to the “image_picker” setting.
Render this image using “img_url” filter.
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.
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?
Hi @UTD-Dev, for Liquid filters we’ve marked as deprecated, we don’t typically prioritize fixes unless the impact is significant, for example if all image formats are affected. This is especially the case when there’s a newer alternative available where the issue doesn’t occur.
That said, I’ll check whether we can prioritize this and follow up with you.
@UTD-Dev We’ve determined that we’ll look into addressing this in the future, but it’s currently a low priority, so it’s unlikely to be addressed in the near term. Once we’ve shipped a fix, we’ll provide an update here.