Thommen Posted April 21, 2020 Share Posted April 21, 2020 When uploading product files in webp format, I have Quote Image format not recognized, allowed formats: gif, jpg, png How can I upload webp files to PrestaShop 1.7? 1 Link to comment Share on other sites More sharing options...
ludovic mantion Posted May 8, 2020 Share Posted May 8, 2020 je suis aussi entrain de regarder. Pour suivre Link to comment Share on other sites More sharing options...
Mgosan Posted May 18, 2020 Share Posted May 18, 2020 En 8/5/2020 a las 11:15 AM, ludovic mantion dijo: je suis aussi entrain de regarder. Pour suivre Hi, any solution for this problem?? i have webp images but is not recognized by prestashop Link to comment Share on other sites More sharing options...
Mgosan Posted May 19, 2020 Share Posted May 19, 2020 En 21/4/2020 a las 4:33 PM, Thommen dijo: When uploading product files in webp format, I have How can I upload webp files to PrestaShop 1.7? Hi thomman, thanks for your help, your link say buy a prestashop modul?? Any free modul for it?? Link to comment Share on other sites More sharing options...
Thommen Posted May 19, 2020 Author Share Posted May 19, 2020 There are no free modules, they are only paid. Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 19, 2020 Share Posted May 19, 2020 Hello @Thommen, In this case you have 2 ways: 1) Convert your image to other allowed formats 2) Modify core of PrestaShop to upload your format. Link to comment Share on other sites More sharing options...
Thommen Posted May 19, 2020 Author Share Posted May 19, 2020 @HelperPro I gave the solution, only my post was deleted Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 19, 2020 Share Posted May 19, 2020 And it means, you have already solved the problem. Congratulations. Link to comment Share on other sites More sharing options...
Mgosan Posted May 19, 2020 Share Posted May 19, 2020 Hi both, Modify core prestashop is not possible for me 🙃, i don't have the know for it. This is the code, rigth? find. name "*.png" | xargs -I {} cwebp {} -o {} Regards Link to comment Share on other sites More sharing options...
Thommen Posted May 19, 2020 Author Share Posted May 19, 2020 This is a CLI command that you enter after connecting via SSH. You can set it in crontab to automatically search and replace image files. Remember that the command is for PNG files. You can extend it with additional extensions. The host must support cwebp from → https://developers.google.com/speed/webp Link to comment Share on other sites More sharing options...
muzica9 Posted December 20, 2020 Share Posted December 20, 2020 On 5/19/2020 at 3:54 PM, Thommen said: This is a CLI command that you enter after connecting via SSH. You can set it in crontab to automatically search and replace image files. Remember that the command is for PNG files. You can extend it with additional extensions. The host must support cwebp from → https://developers.google.com/speed/webp can please give more details on private message. thank you. Link to comment Share on other sites More sharing options...
NicolasV Posted February 8, 2022 Share Posted February 8, 2022 You can also modify the filemanager code so that it can handle webp on import, like this: Image Attached Files changed : /admin/filemanager/ajax_calls.php /admin/filemanager/config/config.php /admin/filemanager/upload.php 2 2 1 Link to comment Share on other sites More sharing options...
haitam.chtiba@gmail. Posted February 25, 2022 Share Posted February 25, 2022 On 2/8/2022 at 5:17 PM, NicolasV said: You can also modify the filemanager code so that it can handle webp on import, like this: Image Attached Files changed : /admin/filemanager/ajax_calls.php /admin/filemanager/config/config.php /admin/filemanager/upload.php Did not work for me on prestashop 1.7.7.1 Link to comment Share on other sites More sharing options...
ComGrafPL Posted February 25, 2022 Share Posted February 25, 2022 40 minutes ago, haitam.chtiba@gmail. said: Did not work for me on prestashop 1.7.7.1 At this moment the best solution is jpeg / png and module to convert to webp. 1 Link to comment Share on other sites More sharing options...
haitam.chtiba@gmail. Posted February 25, 2022 Share Posted February 25, 2022 1 hour ago, ComGrafPL said: At this moment the best solution is jpeg / png and module to convert to webp. that's what i did thank you Link to comment Share on other sites More sharing options...
Nickz Posted February 25, 2022 Share Posted February 25, 2022 I would not use webP files as long as there are even 2 % on browsers not recognising that file format. Further it's a Google format, most likely they collect data from it. 1 Link to comment Share on other sites More sharing options...
Thommen Posted February 28, 2022 Author Share Posted February 28, 2022 find ./ -type f -name '*.jpg' -o -name '*.png' | xargs -P 9 -I {} sh -c 'cwebp $1 -o $1 || true' _ {} \; Link to comment Share on other sites More sharing options...
shahinnn Posted June 8, 2022 Share Posted June 8, 2022 Hi, Thanks to NicolasV for the solution. Answered for me in Prestashop 1.6. you have to do is change the code mentioned in .htaccess, put the webp read code of the web server and delete the PrestaShop cache once. Good luck Link to comment Share on other sites More sharing options...
GoPure Kratom Posted June 21, 2022 Share Posted June 21, 2022 Hi, Likewise here! Would need a solution for 1.7.x Link to comment Share on other sites More sharing options...
Nickz Posted June 21, 2022 Share Posted June 21, 2022 2 hours ago, GoPure Kratom said: Would need a solution for 1.7.x have you tried the one offered? https://www.prestashop.com/forums/topic/1020761-how-to-upload-webp-files/?do=findComment&comment=3378056 Link to comment Share on other sites More sharing options...
GoPure Kratom Posted August 17, 2022 Share Posted August 17, 2022 On 6/22/2022 at 3:43 AM, Nickz said: have you tried the one offered? https://www.prestashop.com/forums/topic/1020761-how-to-upload-webp-files/?do=findComment&comment=3378056 No, but someone mentioned above that it didn't work for 1.7.xxx Link to comment Share on other sites More sharing options...
NicolasV Posted August 21, 2022 Share Posted August 21, 2022 On 8/17/2022 at 10:50 AM, GoPure Kratom said: No, but someone mentioned above that it didn't work for 1.7.xxx I think it's worth a try, especially since the solution I implemented is in production on a 1.7 (and working). Link to comment Share on other sites More sharing options...
Sickboards Posted September 5, 2022 Share Posted September 5, 2022 Although I don't understand the && $info['extension'] != "webp" part in upload php (I would have expected something like: || $info['extension'] == "webp") I can confirm it is working in 1.7.5.4 Link to comment Share on other sites More sharing options...
Dennismax Posted September 10, 2022 Share Posted September 10, 2022 I can't get to work in 1.7.8.7 😕 Did I do somethings wrong ? Link to comment Share on other sites More sharing options...
Nickz Posted September 11, 2022 Share Posted September 11, 2022 In case of having a shop which actually works, stick to jpg as long as webP is not 100% accepted in all browsers. WebP is from Google, a format from Google I'd not advice to use, same goes with Google Fonts. Just mediums to spy on us. Link to comment Share on other sites More sharing options...
kaliwaw Posted October 13, 2022 Share Posted October 13, 2022 On 8/21/2022 at 2:41 PM, NicolasV said: I think it's worth a try, especially since the solution I implemented is in production on a 1.7 (and working). I tried your solution in version 1.7.8.7 but it doesn't work. I also tried clearing the cache but nothing. Do you have any suggestions? Thanks in advance Link to comment Share on other sites More sharing options...
GoPure Kratom Posted October 17, 2022 Share Posted October 17, 2022 On 9/11/2022 at 10:52 PM, Nickz said: In case of having a shop which actually works, stick to jpg as long as webP is not 100% accepted in all browsers. WebP is from Google, a format from Google I'd not advice to use, same goes with Google Fonts. Just mediums to spy on us. If you are a seller, switching to WebP might be a big factor in getting your site load times better (depending on what format was used earlier) and ranking better in Google CWV's which again can be ntoceable amount of added revenue. Also JPG's don't support transparency which is why many use PNG and the diference between PNG an WebP is significant. Link to comment Share on other sites More sharing options...
dbdropper Posted January 25, 2023 Share Posted January 25, 2023 Hey everyone, I know this is an old topic, but it's the first result on Google. From my experience, editing the core is generally a bad idea - it messes up the future upgrades - in this specific case, the proposed solutions, as @Nickz fairly pointed out above, may not be 100% compatible with all browsers On 9/11/2022 at 2:52 PM, Nickz said: In case of having a shop which actually works, stick to jpg as long as webP is not 100% accepted in all browsers. WebP is from Google, a format from Google I'd not advice to use, same goes with Google Fonts. Just mediums to spy on us. (While I agree with the point about Google collecting as much data as they can, the webp unlike fonts is not hosted on Google servers, and instead is a yet another file on our servers, so shouldn't be a problem?) So what I think could be a good way out is, as they say, "graceful fallback", as described here: - https://serverfault.com/questions/630212/conditionally-serving-high-resolution-and-webp-images-with-nginx - https://alexey.detr.us/en/posts/2018/2018-08-20-webp-nginx-with-fallback/ For it to work you will have to have your shop served on a proper server with Nginx and have basic understanding of how to configure it. I won't copy the whole thing here, but the general idea is - you run a command (or schedule a script) to generate and have *.webp files alongside your regular images - you configure the webserver to look at the accept header coming from the client's browsers: if webp is mentioned there, then it serves the webp copy, otherwise business as usual We have done it like this in our shop and it's been running perfect for well over a year. Kudos to whoever came up with the idea first! (I would give a better credit if I could figure out who it was.) Link to comment Share on other sites More sharing options...
JBW Posted January 26, 2023 Share Posted January 26, 2023 WebP is now officially supported in new Prestashop 8.0.0! 1 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