• Hey guys,

    One of my sites is getting lots of errors like the following in the debug log. I can’t specific find anything in my searches as to what this specific “File too small (0)” error actually means.

    Any advice on what might be happening here, or other tips to troubleshooting this would be greatly appreciated.

    [20-Sep-2022 17:52:48 UTC] PHP Warning: exif_read_data(): File too small (0) in ...wp-admin/includes/image.php on line 846
    
    [20-Sep-2022 17:52:54 UTC] PHP Warning: exif_read_data(): File too small (0) in ...wp-admin/includes/image.php on line 846
    
    [20-Sep-2022 18:10:04 UTC] PHP Warning: exif_read_data(): File too small (0) in ...wp-admin/includes/image.php on line 846
    
    [20-Sep-2022 18:10:09 UTC] PHP Warning: exif_read_data(): File too small (0) in ...wp-admin/includes/image.php on line 846
Viewing 6 replies - 1 through 6 (of 6 total)
  • @letterafterz Your first action should be to check the exif data in the image file mentioned. This could be malicious code or a corrupted file. I would recreate/replace the noted image file then if the error continues it may be part of the bug wordpress developers are working to resolve that relates to exif_read_data in which case their suggestion is to confirm that the image file is all good and then turn off debug.

    Per WP developer:
    The only two fixes are either to set WP_DEBUG to false or check the exif data in the image.

    Dion

    (@diondesigns)

    The warning is telling you that Exif encountered a zero-byte image file. So check your upload directories for zero-byte images, and if you find any, delete them or perhaps re-upload the original using FTP.

    Thread Starter letterafterz

    (@letterafterz)

    Thanks @diondesigns @wlpdrpat ,

    Finding those images may be a bit tricky, as there’s over 20k images on the site, any tips for maybe flagging which images could be the culprits?

    @letterafterz I would use FTP and sort images by size from smallest to largest. The images at the top of that list will be the 0kb images. If they are not supposed to be 0kb them change them out via FTP. To ensure that your db stays in sync, if you decide to delete them I would suggest using WP media to delete them, otherwise they will still show up in your media.

    FYI – I had a similar problem a few years ago and it related to a plugin that I was using to import YouTube videos. Each video that was imported created a 0kb image in the media library that was supposed to be the thumbnail of the video. Those were pretty easy to see in the media library as they were blank.

    Dion

    (@diondesigns)

    If you have access to SSH, you can go to the base WP images directory (probably wp-content/uploads) and issue the following command:

    find -type f -size 0

    you will see a list of files with zero bytes. The list will contain all files with zero bytes, not just image files. If the list contains more than, say, 50 image files, I’d suggest trying to figure out why you have so many zero-byte images before you go any further.

    Thread Starter letterafterz

    (@letterafterz)

    Might be a bit tricky to find the image as all the media is stored offsite on an AWS S3 bucket, but that answers my question.

    Thanks all.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘exif_read_data(): File too small (0)’ is closed to new replies.