Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292662

Allow WEBP quality to be configurable in GD2 image manipulation toolkit settings

$
0
0

Problem/Motivation

According to php documentation when converting image to webp quality argument can be passed to set the quality of the image.
In gd.php default is set to 80% and there is no way to configure or change this value.
function imagewebp($image, $to = null, $quality = 80): bool {}

Steps to reproduce

Go to admin/config/media/image-toolkit
Select GD2 for image processing
Only JPEG quality is configurable not WEBP.

Proposed resolution

Make the quality settings configurable and pass the configured value to imagewebp().

User interface changes

When selected GD2 to process images add an additional field to take the WEBP quality value similar to ones taking JPEG.


Viewing all articles
Browse latest Browse all 292662

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>