This library is used as the engine to provide webp conversions to a handful of platforms. Projects using WebP Convert CMS plugins using WebP Convert To set this up, follow what's described in this tutorial (not updated for 2.0 yet). The library can be used to create a WebP On Demand solution, which automatically serves WebP images instead of jpeg/pngs for browsers that supports WebP. The old introduction (for 1.3.9) is available here: docs/v1.3/serving/convert-and-serve.md WebP on demand The following introduction is a must-read (for 2.0):ĭocs/v2.0/serving/introduction-for-serving.md. all convert option can be entered here (ie "quality") Other options include 'throw', '404' and 'report' //'show-report' => true, // Generates a report instead of serving an image 'serve-image' => [ 'fail' => 'original', // If failure, serve the original image (source). WebPConvert:: serveConverted( $source, $destination, [ Require the library with Composer, like this: In addition to converting, the library also has a method for serving converted images, and we have instructions here on how to set up a solution for automatically serving webp images to browsers that supports webp. ewwww (using the ewww cloud converter (1 USD startup and then free webp conversion)).wpc (using WebPConvert Cloud Service - an open source webp converter for PHP - based on this library).ffmpeg (executing ffmpeg binary using an exec call).graphicsmagick (executing graphicsmagick binary using an exec call).imagemagick (executing imagemagick binary using an exec call).cwebp (executing cwebp binary using an exec call).The library can convert using the following methods: It supports an abundance of methods for converting and automatically selects the most capable of these that is available on the system. In a future release, I will try to offer a different approach that uses fewer privileges.This library enables you to do webp conversion with PHP. I regret having to use the "All sites" permission, but most images these days load from a different server, and that creates a cross-site access problem (canvas taint) that often blocks the extension from saving unless it has permission in advance. The button bar may not appear and images may not be saved if scripts are blocked from running in the page (for example, by the NoScript extension). * Ctrl+click "Save webP as." to save in JPEG format at 92% quality (on Mac, use Command+click)Įxtensions can only save under your Downloads folder, but you can set up date or site folders to help keep organized. * Shift+click "Save webP as." to save in PNG format * Click "Save webP as." to show format/quality buttons overlaid on the image These are the default actions, but you can switch them around to fit your needs (on the Options panel): If you want to discourage sites from sending webP format images at all, especially if you are having trouble saving GIFv files, check out my other extension: Don't "Accept" image/webp. There also is a button to re-request the image masquerading as Internet Explorer 11 (you might need to click it a second time because Firefox likes to serve the cached iamge), and a button to send animated WebP images to for conversion to animated GIFs. This extension allows converting from WebP (or any other format) to PNG or JPEG.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |