changing JPEG compression level

Submitted by remo - 4 years ago

There are a couple of functions in concrete5, where JPEG's are created on the fly. Whether you're using the image helper to create a thumbnail or simply use the image block, pictures are often resized to avoid sending pictures taken straight from a camera to an end-user. By default, those pictures are compress using 80 but sometimes you might need a different value.

// put this in config/site.php
define('AL_THUMBNAIL_JPEG_COMPRESSION', 90);

// here's a complete example
/*
<?php
define('DB_SERVER', '127.0.0.1');
define('DB_USERNAME', 'user');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'concrete5');

define('AL_THUMBNAIL_JPEG_COMPRESSION', 90);
*/
comments powered by Disqus