I’ve noticed some bizarre behaviour in my WordPress installation.
For some photos, when I click “Edit Image”, the full image is not displayed to me – just the area visible in the thumbnail. And yet, if you click “View Image”, you can see the full image is actually there.
Clearly, some manual intervention is required for this pic’s thumbnail.
Click on edit image, only to find the whole image is not presented to me for cropping/editing. Has the image been cropped on upload, maybe?
View attachment shows that no, the whole image is actually there – its just not available to me in the image editor.
What’s going on?
This is only an issue for certain photos, and I can’t see any difference between them – they are all JPGs, and there is no weird EXIF data that I can see… and yet some photos I can crop, and others not…
what you are describing here (cropped big size image in Edit Media screen) is a perfectly normal behavior when you use
Apply changes to: All image sizes
while cropping image and I believe the same thing could happen during upload when$crop
param is set totrue
for all registered image sizes (similar to how add_image_size function works) As suggested above – deactivate image-related plugins and see what happens.Anyway – the strangest thing is that there’s no
Restore Original Image
button in your screenshot. This button is exactly what you need to work with the original size in editor.See the update below…
I can replicate this only AFTER I crop the image but BEFORE i save it. The
Restore Original Image
button appears there as soon as I come back to edit it again after saving it.See my screenshot:
This is apparently not a final answer, but it doesn’t really fit the comment format so it ended up here…
UPDATE:
From looking at the source of image-edit.php it seems that a crucial role in decision whether to display the ‘Restore..’ link is a value of
_wp_attachment_backup_sizes
post meta field of a given attachment.I would suggest checking that value for the problematic attachments. You can use something like this:
(or use the WordPress Console plugin)
Maybe you will find something odd there. Try also comparing these values between the broken and correctly displayed attachments… Again I know I’m not giving you the answer you’d like to hear but I believe this could be the right direction to investigate.
Cheers
The same thing is happening to me. I found this page describing the same problem. It seems that it could be caused by the theme. Though changing the theme does not resolve the issue for me (and I have all my plugins disabled too).
I think this only happens on my images which are taller than they are wide (“portrait” orientation). If the image is wider than it is tall, it gets resized to fit correctly. Gotta be some bug in WordPress’s image resizing algorithm. grrr…
Annoying workaround: edit image and change the image size, adding “padding” to the sides so that the are wider than tall (if you’re in Photoshop, change the canvas size, alt-ctrl-c). Then re-upload the image to wordpress.
Running WordPress 3.2.1/ PHP 5.2.17 / twentyeleven theme / no plugins
Tried running the auto “Re-Install WordPress” (clicked button on the Update tab), but it didn’t change anything.
Could be something to do with the image size (tested with jpeg images):
Seems to only fail when the image is exactly 400px wide
I filed a bug report for this. Hopefully the WordPress devs can look at this.
I’ve created this simple function to get it.
Look in your theme files for:
Where
thumb_name
andsome_number
could be anything. Simply remove, true
:Or if you need hard crop mode, change
400
to any other number (399
or401
is fine)I spent many hours researching this issue, and it’s definitely a bug (even in WordPress 3.4.1). As kristi mentions, it occurs with images that are 400 pixels wide. It also occurs if your theme adds an image size with a height of 400 pixels and hard crop mode enabled. I’ve updated the bug report, and I hope it gets fixed soon!