From: Mischa POSLAWSKY Date: Thu, 23 Aug 2018 18:45:46 +0000 (+0200) Subject: thumb: jpeg encoding regardless of original X-Git-Tag: v3.7~14 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/af49d9b508825f62a0ea80c9069dd32d1147b433 thumb: jpeg encoding regardless of original Disregard original file format after resizing, as it keeps lossless [png] compression [size] and inconsistent results. Unaltered request extension may not match, but should mostly display correctly as browsers should prefer the correct content-type instead. --- diff --git a/thumb/index.php b/thumb/index.php index 2a8e303..24f46cc 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -91,7 +91,7 @@ function mkthumb_exec($source, $target, $width, $height) '-trim', '-resize', "${width}x${height}", '-quality', '90%', - $source, $target + $source, "jpg:$target" ])); $return = shell_exec("$cmd 2>&1"); if ($return) {