tried to find some reason for this strange issue for some time now, I hope somebody can help me.
I have a Laravel 5 app. There is one controller method that should return an image from the storage (S3 or local) and add some filling for png backgrounds. It was totally working since yesterday, but now it stopped to work without any possible reason.
This is my code:
<?php
class Controller{
public function gimmeTheImage(){
$img = \Image::make('img/profile/placeholder.jpg'); // Also tried with binary data from S3 via \Storage::get($pathtofile);
$img->doSomething(); // like filling the background or resizing...
return $img->response('jpg'); // This worked until yesterday
}
}
Until yesterday, this gave me a perfect jpg result, now it just produces a broken image. The error is independent of browsers (tested Chrome, Safari, Firefox), there were no composer updates that could have changed anything (besides I rolled back everything) and there is no error message in the logs. The produced files do contain the correct mime type and have some seamingly correct filesize but just don't work. I also tested this on several servers, so it should not be a gd error.
Any idea?