Today, when GD's resizeimage function handles the thumbnail of the jpg suffix file, it prompts that the image is not a legal jpg image and reports an error
<b>Warning</b>: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters for sequential JPEG
I have checked a lot of information online in China but I have not found any effective solution. It turns out that just open the GD jpeg file to solve it.
ini_set('gd.jpeg_ignore_warning', true);
Write the above line of code at the beginning or open this configuration in the file
The above content is analyzing and solution for the failure to generate thumbnails in some jpg files for php resizeimage. I hope it will be helpful to everyone!