diff --git a/src/_h5ai/conf/options.json b/src/_h5ai/conf/options.json index cb05ee63..06562ed7 100644 --- a/src/_h5ai/conf/options.json +++ b/src/_h5ai/conf/options.json @@ -312,6 +312,7 @@ Options - doc: array of types - delay: delay in milliseconds after "dom-ready" before thumb-requesting starts - size: number, size in pixel of the generated thumbnails + - exif: boolean, use included EXIF thumbs if possible */ "thumbnails": { "enabled": true, @@ -319,7 +320,8 @@ Options "mov": ["video"], "doc": ["pdf", "ps"], "delay": 1, - "size": 96 + "size": 96, + "exif": true }, /* diff --git a/src/_h5ai/server/php/inc/Thumb.php b/src/_h5ai/server/php/inc/Thumb.php index d227279c..7476575e 100644 --- a/src/_h5ai/server/php/inc/Thumb.php +++ b/src/_h5ai/server/php/inc/Thumb.php @@ -56,7 +56,8 @@ class Thumb { $image = new Image(); $et = false; - if (function_exists("exif_thumbnail")) { + $opts = $this->app->get_options(); + if ($opts["thumbnails"]["exif"] === true && function_exists("exif_thumbnail")) { $et = @exif_thumbnail($source_abs_path); } if($et !== false) {