Skip to content

Commit

Permalink
Enable imagemagick default params for jpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
onli committed Apr 3, 2024
1 parent 2de125d commit f62d3ba
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions serendipity_config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,12 @@
$serendipity['useInternalCache'] = true;
}

// You can set parameters which ImageMagick should use to generate the thumbnails
// by default, thumbs will get a little more brightness and saturation (modulate)
// an unsharp-mask (unsharp)
// and quality-compression of 75% (default would be to use quality of original image)
if (!isset($serendipity['imagemagick_thumb_parameters'])) {
$serendipity['imagemagick_thumb_parameters'] = '';
// Set a variable like below in your serendpity_config_local.inc.php
//$serendipity['imagemagick_thumb_parameters'] = '-modulate 105,140 -unsharp 0.5x0.5+1.0 -quality 75';
// Sets a subset of the old lighthouse recommended jpeg settings, plus an unsharp filter to improve
// image quality when resizing.
//
// Set a variable like below in your serendpity_config_local.inc.php with your own settings
$serendipity['imagemagick_thumb_parameters'] = '-sampling-factor 4:2:0 -unsharp 0x0.75+0.75+0.008 -strip -quality 85 -interlace JPEG';
}

serendipity_plugin_api::hook_event('frontend_configure', $serendipity);
Expand Down

0 comments on commit f62d3ba

Please sign in to comment.