Edit Images – Image not displaying
-
Short version: Why does WordPress try to display the medium (400×300) size generated image in the “Edit Image” page for the Media Library, and how do I make it display the actual image file?
Long version: When I try to use “Edit Image” in either the Media Library or under “Gallery” when inserting images into Posts, no image shows up for editing. What I get is something that looks very similar to the screenshots in this post:
https://www.ads-software.com/support/topic/edit-image-image-does-not-show-upI’ve determined that, for some images, WordPress tries to find the medium-size image generated during upload. For other images it uses the original image. For the images that don’t show up, in Firefox, no image shows – with Safari and IE, a “broken image” placeholder shows. I think this might be a “feature” introduced with a relatively recent upgrade because newer images seem to have this problem but older images don’t (no, I haven’t gone through all 900+ images on my site).
Using various plugins and a few function.php tricks I’ve found online, my WordPress installation automatically resizes original images to 640×480, creates a small thumbnail (150 max height/width) and doesn’t generate the medium or large images. I don’t want anything more than the two images but I’d like to be able to occasionally use the online editing tool.
Where I’m stuck is trying to figure out WHY (and where in the code) WordPress is trying to use the medium image and how to make it just look for the original image for all images. I’ve grovelled through the forums, bug listings and code to the best of my ability but I think I’m in over my head…
I’ve found the generated URL for one of the images with problems, and if I put that directly into the Address bar, I get an error message like this:
Warning: imagecreatefromjpeg(/my-website-location-munged/wp-content/uploads/2012/07/IMG_1517-400×300.jpg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /my-website-location-munged/wp-admin/includes/image.php on line 385
-1Note how the error message specifically references “IMG_1517-400×300.jpg” – the medium sized image. If I briefly rename one of the images that does display in “Edit Image”, I get a similar error message but the link references the original image, not a resize.
I’ve done all the usual recommendations – deactivated plugins, temporarily renamed the plugin folder via FTP, set all the resized media settings to 0, reset my theme to the default – and uploaded new images between each step as tests and nothing seems to change WordPress’s desire to display the medium size images in the image editor. I don’t know if I should be looking through the database to remove references to the intermediate file sizes or modifying something in the php code that displays the image.
Thank you for any explanations or pointers toward solutions!
- The topic ‘Edit Images – Image not displaying’ is closed to new replies.