diff --git a/public/thumbnail.php b/public/thumbnail.php index 58bc2dd..c9c3fd5 100644 --- a/public/thumbnail.php +++ b/public/thumbnail.php @@ -1,9 +1,11 @@ cropThumbnailImage($width, $height); $imagick->setImagePage(0, 0, 0, 0); if (file_put_contents($thumb, $imagick) === false) { - throw new Exception("Could not put contents."); + log_error("Could not put contents."); } - return true; + + header("Content-type: image/jpeg"); + echo $imagick; + exit; } else { - throw new Exception("No valid image provided with {$img}."); + log_error("No valid image provided with {$img}."); }