WordPress.org

Support

Support » How-To and Troubleshooting » “imagecreatefromstring” errors uploading certain images

“imagecreatefromstring” errors uploading certain images

  • My fault for replaying to an existing topic, but one which had been marked as ‘resolved’ from early in WP 2.0’s lifespan.

    I’m a little worried not to see that this is a common issue, however it’s an annoyingly persistent one. Certain files prompt the following errors for no reason I can discern:

    Warning: imagecreatefromstring() [function.imagecreatefromstring]: gd-jpeg: JPEG library reports unrecoverable error: in /homepages/4/d283887148/htdocs/wp-includes/media.php  on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Passed data is not in 'JPEG' format in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Couldn't create GD Image Stream out of Data in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: gd-jpeg: JPEG library reports unrecoverable error: in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Passed data is not in 'JPEG' format in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Couldn't create GD Image Stream out of Data in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: gd-jpeg: JPEG library reports unrecoverable error: in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Passed data is not in 'JPEG' format in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    
    Warning: imagecreatefromstring() [function.imagecreatefromstring]: Couldn't create GD Image Stream out of Data in /homepages/4/d283887148/htdocs/wp-includes/media.php on line 253
    145

    It crops up after uploading is complete, and replaces the form with which we usually change the title, caption and positioning of the image. I can still insert the image, but only at full size – the GD errors prevent WordPress from making my thumbnails.

    It affects perfectly functional .JPG files, even after they’ve been renamed or duplicated, or the file extension changed to .JPEG and back. However if I cropped one of the images to a slightly different ratio, the upload went ahead with no such issues.

    I realise now that this is almost certainly down to something in the original file – can anyone shed any light on what causes it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m having the same issue. The only difference is that I’m letting the function detect the image type automatically instead of specifying the type, and I’m only getting one error consistently, “Data is not in a recognized format.”

    Did you find how to solve this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“imagecreatefromstring” errors uploading certain images’ is closed to new replies.
Skip to toolbar