Permalink
Browse files

Use of EXIF thumbnails optional (opt-out).

  • Loading branch information...
1 parent 00cc9fb commit 8b2852ec9d457cf113da4db82dc2c1e776060890 @lrsjng committed Aug 31, 2013
Showing with 5 additions and 2 deletions.
  1. +3 −1 src/_h5ai/conf/options.json
  2. +2 −1 src/_h5ai/server/php/inc/Thumb.php
@@ -312,14 +312,16 @@ 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,
"img": ["bmp", "gif", "ico", "image", "jpg", "png"],
"mov": ["video"],
"doc": ["pdf", "ps"],
"delay": 1,
- "size": 96
+ "size": 96,
+ "exif": true
},
/*
@@ -56,7 +56,8 @@ private function thumb_href($source_abs_path, $mode, $width, $height) {
$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) {

0 comments on commit 8b2852e

Please sign in to comment.