From 3c8de7b59d010f8273370c720aafde80067f77d7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 7 May 2018 23:57:17 -0700 Subject: use imagemagick first stage thumbnail for cover photos, if configured --- include/photos.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/photos.php') diff --git a/include/photos.php b/include/photos.php index 495043bbf..2d2c9cc13 100644 --- a/include/photos.php +++ b/include/photos.php @@ -84,10 +84,11 @@ function photo_upload($channel, $observer, $args) { // logger('imagick thumbnail command: ' . $cmd); for($x = 0; $x < 4; $x ++) { exec($cmd); - if(! file_exists($tmp_name)) { - logger('imagick scale failed. Retrying.'); - continue; + if(file_exists($tmp_name)) { + break; } + logger('imagick scale failed. Retrying.'); + continue; } if(! file_exists($tmp_name)) { logger('imagick scale failed. Abort.'); -- cgit v1.2.3