glide icon indicating copy to clipboard operation
glide copied to clipboard

RFC: Change default quality to 85.

Open ADmad opened this issue 7 years ago • 2 comments

Using jpegs with quality above 85 makes Google Pagespeed Insights unhappy. Here's what they say:

Reduce quality to 85 if it was higher. With quality larger than 85, the image becomes larger quickly, while the visual improvement is little.

While it's pretty easy to set desired quality using the q param, I think using the recommended value of 85 instead of current 90 would be a better default.

ADmad avatar Nov 05 '17 19:11 ADmad

You can change the default quality to 85 by adding q to your defaults in ServerFactory::create() e.g.:

$server = ServerFactory::create([
    'response'          => new LaravelResponseFactory(app('request')),
    'source'            => $filesystem->getDriver(),
    'cache'             => $filesystem->getDriver(),
    'cache_path_prefix' => '.cache',
    'base_url'          => 'img',
    'defaults'          => ['q' => 85] // <--- add this.
]);

baileylo avatar May 10 '18 07:05 baileylo

@baileylo, @ADmad isn't asking about how to change it, he's asking whether we should change the default within Glide itself.

jbrooksuk avatar May 14 '18 15:05 jbrooksuk