I\' am getting this error when use imagecreatefromjpeg
function.
Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Invalid SO
I also get the same issue
we used below code to fix this issue and it works for me.
$image = @ImageCreateFromJpeg($image_name);
if (!$image)
{
$image= imagecreatefromstring(file_get_contents($image_name));
}
You can ignore the error with
ini_set ('gd.jpeg_ignore_warning', 1);
(this is the default since PHP 7.1, but not in older versions)
See http://php.net/manual/en/image.configuration.php