I think now Shopify supports .webp resizes. In your code there is a seciton at src/components/ShopifyImage.svelte that prevent webp images to be resized.
// If image is a webp, remove the .webp extension from the url
// (Shopify image transformations don't work with webp)
if (image && image.url.includes(".webp")) {
return `${image.url.replace(
".webp",
""
)}&width=${width}&height=${height}`;
}
I ve tried to add some webp images into my product list and i wasnt' able to load them properly. Commenting that code everything is ok.
First of all, thank you for the awesome work!
I think now Shopify supports .webp resizes. In your code there is a seciton at
src/components/ShopifyImage.svelte
that prevent webp images to be resized.I ve tried to add some webp images into my product list and i wasnt' able to load them properly. Commenting that code everything is ok.
I hope this helps! ;)