#4049 - webp support

Identifier #4049
Issue type Feature request or suggestion
Title webp support
Status Completed
Handling member Chris Graham
Addon core
Description webp is now supported in all the major browsers but Composr doesn't allow uploading of webp. Given the files are smaller and faster loading with no loss of quality I think it's about time we allowed this image type.
Steps to reproduce

Additional information Useful way to convert png/jpg to webp (for those who would rather not have mixed file types).

<?php
$file = 'image.jpg'; // or image.png
$image = imagecreatefromstring(file_get_contents($file));
ob_start();
imagejpeg($image,NULL,100);
$cont = ob_get_contents();
ob_end_clean();
imagedestroy($image);
$content = imagecreatefromstring($cont);
$output = 'image.webp';
imagewebp($content,$output);
imagedestroy($content);
echo '<h4>Output Image Saved as '.$output.'</h4>';
ob_flush();
?>

And there's a polyfill for browsers that don't support WebP @ https://github.com/chase-moskal/webp-hero
Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated