Jump to content

Prestashop Webp thumbnails auto generation

Recommended Posts

I was reading that PHP 5.5 already has a webp image generator, and the code to do it is as follows:


$imgName = "codingslover.jpg";
$webPName = "codingslover.webp";


cwebp [quality qualitypercentage] [source image] -o [destination]

exec("cwebp -q 0 ".$imgName." -o ".$webPName." ");

Anthor Method:

exec("convert -colorspace RGB ".$imgName." ".$webPName . " ");


Could this be used to auto generate webp thumbnails using the function protected function _regenerateNewImages from AdminImagesController.php aside from the .png or .jpg default ones?


Unfortunately it seems that webp support in prestashop is stagnated :/

Share this post

Link to post
Share on other sites
  • 4 years later...



I know it's a quiet old topic but it's really interesting, if you have find any ways to do it, I'd love to know, I'm going to try to implement that myself, let's see what is going on !

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More