ImageMagick now supports the "near-lossless" option (provided Imagick >= 7.0.10-54) #299.This version is able to dectect more mime types by sniffing the first couple of bytes. Bumped image-mime-type guesser library to 0.4.It also now warns about deprecated options. The part of the log that displays the options are made more readable.New method: WebPConvert::getConverterOptionDefinitions() The feature is already in use in the webp-convert file manager, which is used in WebP Express. This allows one to auto-generate a frontend based on conversion options. Converter option definitions are now accessible along with suggested UI and helptexts.It is now tested on Windows, Mac and with deactivated functions (such as when exec() is disabled) Rationale: A half-working converter causes more trouble than one that is marked as not operational Gd is now marked as not operational when the needed functions for converting palette images to RGB is missing.When exec() is unavailable, alternatives are now tried (emulations with proc_open(), passthru() etc).New in 2.9.0 (released, on my daughters 10 years birthday!) 13 Nov: 9 Nov: who contributed with extra generously amounts of coffee / lifetime backing (>50$) - thanks!:.Persons who recently contributed with ko-fi - Thanks! Persons currently backing the project via patreon - Thanks! Please make it possible for me to have both: I enjoy developing this, and supporting you guys, but I kind of need the bread too. The webp-convert library and its dependents as a single PHP file (or two)īread on the table don't come for free, even though this library does, and always will. Currently there are plugins / extensions / modules / whatever the term is for the following CMS'es (ordered by market share): Hopefully this list will be growing over time. 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, [ It also adds X-WebP-Convert-Log headers, which provides insight into what happened.Įxample (version 2.0): require 'vendor/autoload.php' If the method cannot serve a converted image, it will serve original image, a 404, or whatever the 'fail' option is set to. If there already is an image at the destination, it will take that, unless the original is newer or smaller. The WebPConvert::serveConverted method tries to serve a converted image. If you are migrating from 1.3.9, read this Serving converted images ![]() The following introduction is a must-read:ĭocs/v2.0/converting/introduction-for-converting.md. The WebPConvert::convert method comes with a bunch of options. WebPConvert:: convert( $source, $destination, $options) Here is a minimal example of converting using the WebPConvert::convert method: // Initialise your autoloader (this example is using Composer) require 'vendor/autoload.php' Require the library with Composer, like this: composer require rosell-dk/webp-convert ![]() 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.
0 Comments
Leave a Reply. |