X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/f8288b710e1090d88dcacb0fa28823cdbe14072a..d6bf8fa992cc01adc311b2ba80f29d7af466c2f3:/thumb/index.php diff --git a/thumb/index.php b/thumb/index.php index 27a194e..aadbf4f 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -28,6 +28,7 @@ catch (Throwable $e) { exit; } +header('Cache-Control: max-age=2628000, immutable'); header('Content-type: '.mime_content_type($target)); readfile($target); exit; @@ -89,6 +90,7 @@ function mkthumb_exec($source, $target, $width, $height) $cmd = implode(' ', array_map('escapeshellarg', [ 'convert', '-trim', + '-background', 'white', '-layers', 'flatten', '-resize', "${width}x${height}", '-quality', '90%', $source, "jpg:$target"