Jump to content

Prestashop Webp thumbnails auto generation


moy2010

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";

Syntax:

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 :/

Link to comment
Share on other sites

  • 4 years later...

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...