-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WEBP support in GD driver #718
Conversation
The failed build on Travis CI (PHP 5.5 imagick) doesn’t seem to be related to my changes. |
Description ----------- Depends on contao/image#53 Related: php-imagine/Imagine#718 As @Toflar pointed out in contao/image#53 (comment) this feature makes it possible to automatically generate WEBP images. I didn’t add `webp` to the default `contao.image.valid_extensions` configuration because not all plattforms support it. If someone wants to use this feature they need to add `webp` to the valid extensions in their *config.yml*. Commits ------- 1b6ec2a Add support for image format conversion 271a98a Show help message if WEBP is not enabled c67f82f Use 1.0.0-beta3 version of contao/image c094d19 Fix tests 4631a2b Fix PHPStan issues 7465bcc Add formats to predifined sizes configuration f71cd1e Fix image and picture tests f3866e3 Fix PHPStan issues b9fe888 Fix PHPStan issues efe0c65 Fix the coding style 61accc2 Don’t use JSON for the formats option a6cf0a9 Fix the coding style
Description ----------- Depends on contao/image#53 Related: php-imagine/Imagine#718 As @Toflar pointed out in contao/image#53 (comment) this feature makes it possible to automatically generate WEBP images. I didn’t add `webp` to the default `contao.image.valid_extensions` configuration because not all plattforms support it. If someone wants to use this feature they need to add `webp` to the valid extensions in their *config.yml*. Commits ------- 1b6ec2ac Add support for image format conversion 271a98af Show help message if WEBP is not enabled c67f82fe Use 1.0.0-beta3 version of contao/image c094d193 Fix tests 4631a2b0 Fix PHPStan issues 7465bcc3 Add formats to predifined sizes configuration f71cd1e3 Fix image and picture tests f3866e34 Fix PHPStan issues b9fe8884 Fix PHPStan issues efe0c653 Fix the coding style 61accc28 Don’t use JSON for the formats option a6cf0a9a Fix the coding style
Rewritten as #719 (I like to give credits to every contributor): |
Thank you @mlocati! I noticed that my changes from |
@ausi My fault: I should have added them |
Fixes several issues with handling WEBP images with the GD driver:
imagecreatefromstring()
doesn’t support WEBP in PHP versions lower than 7.3.0 ac7609dwebp_quality
option was ignored 75d75a1webp
is actually available f85731bThis pull request is an alternative to #711, it uses less code and doesn’t require a temp directory.
@mlocati is it OK to have all those fixes in a single pull request or should I create one PR for every fix?