From af49d9b508825f62a0ea80c9069dd32d1147b433 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 23 Aug 2018 20:45:46 +0200 Subject: [PATCH] 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. --- thumb/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.0