}
header('Cache-Control: max-age=2628000');
-header('Content-type: '.mime_content_type($target));
+header('Content-Type: '.mime_content_type($target));
+header('Content-Length: '.filesize($target));
readfile($target);
exit;
'-interlace', 'plane', # progressive
'-strip', '-taint', # omit metadata
'-sampling-factor', '4:2:0', '-colorspace', 'sRGB', # half chroma
- '-resize', "${width}x${height}",
+ '-resize', "${width}x${height}>",
'-quality', '85%',
$source, "jpg:$target"
]));