Home >Backend Development >PHP Tutorial >php resizeimage failed to generate thumbnails for some jpg files, _PHP Tutorial
Today I encountered GD’s resizeimage function when processing thumbnails of jpg suffix files. It prompted that the image was not a legal jpg image and Report an error
<span>1</span> <b>Warning</b>: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters <span>for</span> sequential JPEG
I searched a lot of information on the domestic Internet but could not find an effective solution. It turns out that the solution can be solved by opening the GD jpeg file
<span>1</span> <span>ini_set</span>('gd.jpeg_ignore_warning', <span>true</span>);
Write the above line of code at the beginning or open this configuration in the php.ini file