WordPress.org

Ready to get started?Download WordPress

Forums

Weird image behavior when editing images in the dashboard (12 posts)

  1. vasilescu_anton
    Member
    Posted 1 year ago #

    I have stumbled upon a weird behavior in WP and not sure if it's me or WP at fault!

    On a new installation of WP with 2011 as theme I have created a new post and inserted an image into it. Then went to media library and edited the image to rotate it 90 degrees. After hitting save and update media buttons all seems to be OK but when I get on the home page the thumbnail still shows the initial image! Initially I thought that it needed to regenerate the thumbnails so I have installed AJAX Thumbnail Rebuild and ran it but with no results... After a bit of digging I realized that WP had created a copy of that image with a random string added as a suffix and used that to display within the single post view but on the archive view and home page it is still using the initial thumbnail!

    Can anybody replicate this? Do you guys have any idea to what is happening here? My guess is that it has to do with WP's way of keeping a history of edits for that image... Would there be a way to disable the edit history to see if it works after?

  2. vasilescu_anton
    Member
    Posted 1 year ago #

    Also on an older install of WP I have a post published with an image inserted. After editing the image, the post still keeps the link to the initial image and it doesn't seem to update.

    The initial image was named img-10-300x225.jpg while the updated image became img-10-e1347485852260.jpg and because the post has the initial path hard coded in it's content it seems not to update...

  3. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    Have you tried:
    - deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). Don't forget the ones in mu-plugins if you have that folder. If you can't get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

  4. vasilescu_anton
    Member
    Posted 1 year ago #

    Hi kmessinger, as I stated in the initial post this is a new install of WP with no plugins and with the twenty eleven theme...

  5. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    AFAIK that is normal behavior. Editing the image from the media library does not change previous posts. To do that you have to edit the post.

    WP had created a copy of that image with a random string added as a suffix and used that to display within the single post view

    The single post of the original post should show the original image. Can you post a url for the single post page?

  6. vasilescu_anton
    Member
    Posted 1 year ago #

    Here is the test site: http://gavinv.com/

    If you look on the home page the jellyfish is horizontal but when you click on it, it shows the updated image. To me this is a bug in WP as it updates all the images besides the home page thumbnail...

  7. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    You selected what to update?

    Apply changes to:
    All image sizes
    Thumbnail
    All sizes except thumbnail

  8. vasilescu_anton
    Member
    Posted 1 year ago #

    All image sizes

  9. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    I see what is happening at your site but I cannot duplicate it. It works as it should - the image in single post is not updated.

    Have you tried:
    - deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). If you can't get into your admin dashboard, try resetting the plugins folder by FTP or your hosting site's file manager. Sometimes, an apparently inactive plugin can still cause problems.

  10. vasilescu_anton
    Member
    Posted 1 year ago #

    Ok, I deleted the wordpress install, dropped all the tables in the db then reinstall wp. So there are no plugins/themes that might affect anything.

    The behavior now has changed to where the updated image is not shown at all. This kind of makes sense because now the db record for the image holds the new path but the post has the old hardcoded path to the image. I can live with that. But if you add that image as a featured image you would see the updated one. Still makes sense as the featured image is pulled from the db record.

    Now, this you can say it makes some sense but why this logic? The project I am working on will allow multiple people to upload images then somebody would go and process those images. Now instead of just going in the media and rotate the image then save, you would need to go into each post as well and update the images! In any software the history of editing doesn't create a new version upon each save. Imagine that in Photoshop or in Word every time you would make an edit and save you would get a new randomly named file! It wouldn't make sense wouldn't it?

    Why not upon save just make a copy of the old image, add the suffix then overwrite the initial image with the updated version?

  11. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    Sure lets take Photoshop and Word. I have an image in Photoshop. I save it, open Word and use the image. Now I go back to PS and edit the image. I can save or save as but no matter how I save it, it will not change the image in Word.

    Same with the post. Once done it is locked down unless it is syndicated and then you have a choice to update it if the syndicated copy changes but from where you are, it is locked down. Have you tested this with a draft post or a post held for review? I think it would be the same.

  12. vasilescu_anton
    Member
    Posted 1 year ago #

    I don't think you got your example right. My point is that I edit the image in WORDPRESS and it should be displayed properly in WORDPRESS as well! I am not expecting wordpress to know I edited an image in other program.

    When you are in word and edit an image within word it displays properly. When you are in photoshop and edit an image, the saved image is the same image you seen last on the screen when you were editing it.

Topic Closed

This topic has been closed to new replies.

About this Topic