I am using CodeIgniter and trying to create thumbs of images. I was successful for some but failed for in some cases. I am getting this following error -
<< A PHP Error was encountered
Severity: Notice
Message: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file
Filename: libraries/Image_lib.php
Line Number: 1155 >>
i used this code after 'image_lib' library load.
ini_set('gd.jpeg_ignore_warning', 1);
any solution? Thanks in advance!
Try Adding @imagecreatefromjpeg($img) instead of imagecreatefromjpeg($img)
here @ is error suppressor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With