No dimensions for new images (23 posts)

  1. doclalor
    Posted 2 years ago #

    Apologies for re-posting. I am unable to figure out how to edit my post of 15-20 minutes ago to add new and better information.

    Here's the mystery:

    New image uploads are available via "Add Media" - but with no size options. On individual image edit pages, there is no field for "Dimensions" (as there is on the images I uploaded in days past).

    I also get "Image data does not exist. Please re-upload the image." when I try to EDIT the image.

    I've tried many plugins

    • for regenerating images,
    • resizing (as "Simple Image Sizes" plugin for adding sizes),
    • switching to GD for processing,
    • optimizing the database's _postmeta table,
    • and more.
    • Of course, I've tried adding code to functions.php to add custom image sizes, and
    • tried basic re-uploading, too.
    • I tried disabling every plugin, too.
    • I tried resetting all plugins as [er the WP docs

    The "regenerate thumbnails" plugin gives this error message:

    "{image title}" (ID 5159) failed to resize. The error message was: Unknown failure reason.

    Why would there be no "Dimensions" data listed for the new images?

    Note: I recently switched my site to all HTTPS://. Also, I recently ran the "WP-Optimize" to thin out database junk. I don't see that these created damage, and the urls in the database show the 'https' for the image locations (thanks to a "Search and Replace" in the database).

  2. Michael
    Forum Moderator
    Posted 2 years ago #

    Apologies for re-posting. I am unable to figure out how to edit my post of 15-20 minutes ago

    the posts were unfortunately caught in the spam queue, and would have been released manually by a moderator;
    however, as you have posted here now, I have removed the other posts.

  3. webbrewers
    Posted 2 years ago #

    Was your site auto upgraded to 3.8.1? I've noticed the same problem and confirmed it was a result of that update. The only fix was to delete the new images.

  4. doclalor
    Posted 2 years ago #

    I noticed that _wp_attachment_metadata isn't being generated for these images.

    Why would that be?

  5. doclalor
    Posted 2 years ago #

    Thanks, webbrewers, for the response.

    I DID update to 3.8.1. Should I delete the new images ... and re-upload again? Or wait for 3.8.2? :-/

    I'm so glad to hear you corroborate the problem.

  6. Dave Naylor
    Posted 2 years ago #

    Earlier this week, on a test site, I experienced a problem with images not appearing in my media library but were actually physically present on my server. WordPress should have been displaying them, but wasn't. There's a whole back story to what was going on but I think the problem was corrupted meta data. I tried regenerating thumbnails etc but the problem wouldn't go away.

    I ended up writing a little plugin to rebuild the meta data after doing a lot of Googling. It re-writes the meta data on images, leaving you able to run a regeneration plugin to rebuild your images.

    If you want to try, back up your database (although the plugin won't do any harm) and then grab my plugin from here:


  7. doclalor
    Posted 2 years ago #

    WPRanger, this sounds great. I will try it tonight, during a low-traffic period.

    I'll grab http://wordpress.org/plugins/force-regenerate-thumbnails/ and get to it. Thanks!

  8. doclalor
    Posted 2 years ago #

    I appreciate the try. But the plugin was unable to do its work. Here's a screenshot: force regen fails.

    And in the Media Library there are still those recent uploads with no thumbnails. Screenshot: still no thumbnails.

    For these, I have no size options when Adding Media to posts. However, the resizes are there on the server. WordPress made them, and now doesn't see them.


  9. webbrewers
    Posted 2 years ago #

    Thanks, WP Ranger - I think you're onto something. In my case, someone else uploaded the images direct to the media library so I'm not sure of the exact circumstances. I did notice the problem images were uploaded around the same time the 3.8.1 auto update occurred, so I think there was a problem with the "crunching" process and resized images (and presumably associated meta data) weren't created.
    The end result was a broken "insert image" function, missing images and an eventual browser freeze.
    Deleting all the images from that date fixed some of it, but I still get an error when uploading new images:
    Error DCP_0034.jpg HTTP error.
    If I dismiss the error the image "appears", but again the alternate sizes are missing.

  10. Dave Naylor
    Posted 2 years ago #

    I tweaked the plugin a little. It was failing for me too this morning but it runs AOK now. Grab the latest version, run it then try regenerating again.

  11. doclalor
    Posted 2 years ago #

    WPR, thanks: Your plugin DID regenerate metadata - but it did NOTHING with those same, recently added images. It seemed not to even notice them. (And "force thumb regeneration" gave the exact fail error as before.)

    It's still true that "add new"

    • will display the image as an entry in the Media Library;
    • no thumbnail is displayed in the image's row in Media Library, even though
    • on disk, the resized files are being made;
    • none of those resizings appear as options when I'm "Adding Media", and
    • "Permanently delete" does not remove these images from the disk (although it does remove them from the Media Library).

    I'm looking in the right direction, WPR, but not seeing.

  12. webbrewers
    Posted 2 years ago #

    Thanks again WP Ranger. It looks like your plug in reset all images and removed whatever was corrupting the media library. It would be nice to know what caused this as it seems to be affecting a lot of people.

  13. skel77
    Posted 2 years ago #

    Dear WPRanger

    Ran the plugin just once on a single image and it ran perfectly. Not only that, the whole HTTP error while media upload is also now corrected. Looks like the plugins did some house keeping too.

    WP media upload is now working fine.


  14. Dave Naylor
    Posted 2 years ago #


    I'm still trying to work out what caused the little issue for me. It started when I was messing around with an image gallery. I'd actually mis-configured a function for use with Easy Image Gallery (which excellent) and my post-meta went belly up from there.


    Great, really glad it was useful to you.

  15. doclalor
    Posted 2 years ago #

    Although I remain stuck, I have new information:

    @WPRanger, your plugin does not notice the troublesome image files (it rebuilds metadata for everything except those, which it does not even mention). Could my metadata be "so corrupt" that it doesn't show up?

    • On the other hand, the images are being processed on disk: When I upload initially, no resizes show in the Library; but they show on disk.
    • Also, when I deleted the resizes on disk, and clicked "regenerate," despite an error message of failure on the screen, the resizes were recreated on disk. So while the failure message certainly indicates a problem, it is not a problem with the files on disk. Perhaps it is a problem referencing those files?

    Argh. Why doesn't WordPress offer the resizes in the Library, or when I go to insert an image from the Library?

    Thanks for any help.

  16. doclalor
    Posted 2 years ago #

    In the _postmeta table in the database, there are no entries for _wp_attachment_metadata in the case of these images whose resizes do not show in the Library. (These files do, however, have _wp_attached_file entries.)

    What would explain the metadata not being written in the first place?

  17. doclalor
    Posted 2 years ago #

    New information: When I upload an image, although there are no sizes registered, the timestamp is revealingly off:

    Revised: January 1, 1970 12:00 am

    I'm sure someone has an idea what that reveals... Anyone?

  18. doclalor
    Posted 2 years ago #

    I used the the "Rebuild Thumbnails" feature of the plugin "Simple Image Sizes" ... and now ALL my images' revision dates show as 'Revised: January 1, 1970 12:00 am'.

    And when I run @WPRanger's "Rebuild Meta," no images show up (whereas it used to be all but 5 - now it is ZERO). Somehow, the process I invoked using "Simple Image Sizes" broke important data connections.



  19. radock325
    Posted 2 years ago #

    I also have the problem with the Media Library. Now all images are gone. If I try to upload a file, it's like it starting to upload, but then come with the error: (An error occurred in the upload. Please try again later.)
    I have tried all the options above incl. deactivating all plugins, but without any result.
    This is on a Wamp localhost test machine.
    Using WP 3.8.1 and Hueman theme. I have the same setup on a Synology diskstation and on 2 notebooks, but there it is working ok.
    It woul'd be very interesting to find out what is causing this problem before I reinstall all on this Localhost.


  20. pavegraphics
    Posted 1 year ago #

    Hi I had very similar problems and solved it by activating auto increment for the primary ID on the postmeta table. Some of that info must have got lost on the way during the move.
    Hope this helps someone else as I've been tearing my hair out for days trying all sorts of fixes!!

    #	Name	Type	Collation	Attributes	Null	Default	Extra	Action
    1	meta_id	bigint(20)		UNSIGNED	No	None	AUTO_INCREMENT
  21. sdpnt
    Posted 1 year ago #

    I'm having the same exact issue as @doclalor. Just talked to my database host and they can't find anything unusual on their end. I looked in my phpadmin and it looks like auto increment is already set correctly on my server in regards to @pavegraphics. This is driving me nuts!!! I'm using WP 4.0.

  22. sdpnt
    Posted 1 year ago #

    P.S after some more testing I realize that I think it’s the pixel dimensions of an image. I was trying to upload images that were 2000px wide for good retina display. When I save them out at 1300px max, they upload perfectly. Anything larger, and I get the error. As a test I uploaded a 5000x5000 image at 36kb (almost empty) and it still fails.

    Is this the case for anyone else?

  23. doclalor
    Posted 1 year ago #

    For the record, I never found a solution, unless you count raze-and-restart. That worked. And now I upload images that used to fail.

Topic Closed

This topic has been closed to new replies.

About this Topic