pepperoni Posted January 22 Share Posted January 22 (edited) Hi guys, So I'm trying to achieve all my product images to use webp format, AND not create other unnecessary formats like jpg. I have tried two different things. 1. Having the 'Multiple image formats' Enabled in New & Experimental Features. and having chosen 'WebP' in Image Settings. With this configuration I confirm we can achieve webp image generation but at the same time it generates same images in jpg format too! That it not desirable for me, as I won't use the jpg files and it increases the account file size. 2. The second thing I tried is have the 'Multiple image formats' Disabled in New & Experimental Features. This makes the Image settings look a bit different. So here is what I have, Use WebP for all images. With this configuration, the system generates images only in one format. The funny thing is the format is weird. You get .jpg files but the images are not jpg encoded, they are webp encoded. Think of it as in the first option above you take a webp image and you just rename it to .jpg, ie my_image.webp -> my_image.jpg. What I'm trying to do is just get webp images (not any other formats). Second configuration above is very close. If only the generated images had .webp instead of .jpg. Can anyone point me in the right direction of what is the file responsible for the naming of the images? I can change the code myself. If someone had achieved similar thing using first configuration, then that I'd be fine with it too. Please shed some light if you know more. many thanks prestashop version 8.1.3 Edited January 22 by pepperoni (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted January 22 Share Posted January 22 When you enable webp in your store you should regenerate images. New images will be with jpg extension byt their mime will be webp. Link to comment Share on other sites More sharing options...
pepperoni Posted January 22 Author Share Posted January 22 Hi endriu107, Thanks for the reply. Do you know how to change the jpg extension to webp please? I don't understand the logic of this. If an image is webp then it should have the webp mime. many thanks Link to comment Share on other sites More sharing options...
endriu107 Posted January 22 Share Posted January 22 5 minutes ago, pepperoni said: If an image is webp then it should have the webp mime. and it have that mime. Image extension is not important, prestashop by default save images with jpg extension but it really could be webp, png or avif. I think you want fix something what is not broken because ther is no reason to change extension when mime is correct. Link to comment Share on other sites More sharing options...
pepperoni Posted January 22 Author Share Posted January 22 Hi endriu107, Thanks again. We are getting to a different subject here. I'd like to know how to get the .webp file extension on images when I select webp in prestashop. Any idea which file(s) responsible for this please? many thanks Link to comment Share on other sites More sharing options...
endriu107 Posted January 22 Share Posted January 22 It is not possible. Link to comment Share on other sites More sharing options...
pepperoni Posted January 22 Author Share Posted January 22 That's a bad design. Link to comment Share on other sites More sharing options...
endriu107 Posted January 22 Share Posted January 22 15 minutes ago, pepperoni said: That's a bad design. Why? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now