Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file #21
I am using this package with laravel and for some files that I am trying to resize it happens randomly I get this error:
Hey I found a damaged image, you can take a look at this link for the image http://www.gobiernohuejotzingo.gob.mx/img/noticias/123/123-7EJU0GUFYS.JPG
Thank you for the test image. I did a little research and it seems that GD can't handle this kind of damaged images.
However, I managed to read and resize your image, if the error warnings are suppressed with the following ini setting:
I keep getting this error
The command I'm running is trigerred through a laravel command.
I tried placing this
But I always keep getting that error for that one image. This image does open normally though. Is there another kind of ignore warning flag I should be using?
referenced this issue
Jan 13, 2015
You can set default value of
You can set it like this
After implementing any of the above, GD Library will ignore the error where it use to fail and