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


Comments
IE11 will be some time further.
Generally our baseline web standards support for Microsoft is what Microsoft has considered EOL.
However, that doesn't mean we can't mark webp safe within Composr and make it a choice of the user.
99% of the work was already done for this in v11. I just did the final thing of marking the format web-safe.
It wasn't actually on my radar that Firefox had implemented webp!
As for Composr, I don't really want us adopting webp for bundled images. It only is a very marginal improvement over jpeg for lossless and png for lossy, yet jpeg and png are very widely supported in graphics apps. I'd like to see one of the competing new lossy formats succeed and leapfrog webp. Google are pushing webp as they do like to push things they develop internally even if they are of marginal utility.