glide
glide copied to clipboard
RFC: Change default quality to 85.
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.
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, @ADmad isn't asking about how to change it, he's asking whether we should change the default within Glide itself.