Image Optimization - Change Image Format

Is the Layer0 Image Optimizer able to change image format?
https://docs.layer0.co/guides/image_optimization

Our product image datasource is Shopify, and until recently we were not having an issue converting Shopify’s webp images to jpg. Very recently, we have been getting customers calling in that they cannot view our site on Safari desktop ( pre-BigSur ) because they are getting webp images.

We are using a param &f=jpg in the Image Optimizer url along with the other params, which I believe was working at one point, but it is not in the docs. It’s definitely not working now. Is this f=jpg param correct?

Shopify’s urls let you force a format of jpg but it is on a query string, and the Layer0 optimizer doesnt work when you have two ?s in the url i.e. /opt/moovweb/?quality=80&img=https://cdn.shopify.com/s/files/1/0838/4441/products/Outfit-of-the-Month-May-all_1131_960x.jpg**?v=1620053322&format=jpg**

Any advice on how to force a jpg? Otherwise I feel like we need to take out the image optimizer altogether which would be a shame.

Thank you!

While requesting a particular image format is not supported, we should return a format that the browser supports.

We are going to investigate this and get back to you @justin.

1 Like