Need help with updating existed image file

  • Unknown's avatar

    Hello, I try to update image that I uploaded in one of my post because I realize I uploaded wrong image so I delete current one and upload new image with same file name as attempt to keep image that show in my post intact but WordPress automatically rename my image file by add counter in same manner as I upload file that already existed in my media library, there is any solution to fix this?

    Here is more details of my situation. I upload ABC_1.jpg and add it into my post and realize I need more edit on that ABC_1.jpg so I made new ABC_1.jpg on my computer then go to media library in WordPress and delete ABC_1.jpg then go to my post and remove ABC_1.jpg (which appear as a broken link) from it then add new image from my computer. I upload ABC_1.jpg again and WordPress automatically rename my image file as ABC_11.jpg when there isn’t any ABC_1.jpg currently exists in my media library (because I just remove it before I went to edit my post) there is any way to tell WordPress that please don’t fix my permalink of image? I want to keep ABC_1.jpg permalink for reference. I use wordpress.com for hosting by the way if it relates with my problem.

    Thank you :D

  • Unknown's avatar

    All of our “stuff” is saved and such in a MySQL database and with databases, when you delete something, it isn’t deleted right away but only when a “pack” is scheduled. WordPress will not overwrite existing files to protect users from accidentally uploading a file with the same name and mistakenly overwriting an existing file. I have no idea how often the databases are packed. The other thing is that uploads are organized into dates/years, so the URL of the newly uploaded image, even if the number was not appended, would not be the same as the old image URL.

    A typical image URL looks like this: http://blogname.wordpress.com/files/2008/09/filename.jpg which means it was uploaded in September of 2008.

    You will have to open the post or page where the old image was and then insert the new image (with the appended number) into the post or page and then press the “update” button.

  • Unknown's avatar

    Thanks for your help, thesacredpath. I did what you say for my post and it works well but my problem is permalink I use for reference (example of http://blogname.wordpress.com/files/2009/01/ABC_1.jpg) is unable to use anymore since I deleted ABC_1.jpg from my media library and new uploaded image (ABC_1.jpg, same name) WordPress rename it to ABC_11.jpg (so its permalink is example of http://blogname.wordpress.com/files/2009/01/ABC_11.jpg) so I can’t use it for reference anymore. There is any way to fix new uploaded image permalink to http://blogname.wordpress.com/files/2009/01/ABC_1.jpg ? seem not possible since WordPress works like you said thought, hopefully there is some way around it.

  • Unknown's avatar

    No I’m afraid there isn’t anyway to change a permalink on an image. A post or a page, yes, but not uploads.

  • The topic ‘Need help with updating existed image file’ is closed to new replies.