• Resolved adrian95

    (@adrian95)


    Hello,

    I hope someone can help me, I am trying to replace a picture on a site which it was made by another developer and I am having an issue. I don’t know where to change that picture.

    So, I’ve tried to delete the old picture and upload the new one having the same name as the old one, but instead of changing the picture, it deleted the picture. I’ve just figured out that this happened because the old picture had another url (“wp-content/uploads/2017/11/logo-350f-1.png”) and the new one has another url (“wp-content/uploads/2018/08/logo-350f-1.png”).

    I just need to change “2018/08” to “2017/11” on the url of the new picture I uploaded. This would be easier if I had access to the hosting, so then I would just have to rename the folders but I don’t have access on it. I also tried to change the date of my OS (Windows 10) but that didn’t work.

    Any help please? Thank you so much in advance!

    • This topic was modified 6 years, 3 months ago by adrian95.
    • This topic was modified 6 years, 3 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @adrian95 is there a reason you couldn’t update the source of the old image to the new URL, instead of changing the new URL to match the old image’s source? I believe you have a couple different options here.

    One option would be to use a plugin like https://www.ads-software.com/plugins/post-date-time-change/ to switch the date the image was posted. I have never personally used this plugin but I did install it quick to take a look. You have to switch to the list view in the media library to use it.

    If the image is in your page content only then you could use a plugin like https://www.ads-software.com/plugins/velvet-blues-update-urls/ to change the source to the new url. So in the options page of this plugin you would add the old image source url “domain.com/wp-content/uploads/2017/11/logo-350f-1.png” to the first field “”, and you would add the new one “domain.com/wp-content/uploads/2018/08/logo-350f-1.png” to the second field. You would then check all of the boxes below the two url fields and hit update. It is important to match the format of both URLs exactly. If the first has “domain.com/path/to/image.jpg” and the other has “https://domain.com/path/to/image.jpg” you will end up with a final result of “https://https://domain.com/path/to/image.jpg”.

    That would go through all of your pages and replace the old url with the new one which will get the image working. If the image is used in CSS or template files, or in custom options pages from your theme or widgets this will not work. Those would need to update manually.

    Your last option would be to move the image and its associated thumbnails to the correct directory using a file manager plugin like https://www.ads-software.com/plugins/wp-file-manager/ but this is a last resort and shouldn’t be necessary. It would make the image inaccessible through the media library, since the old image information has already been removed from the database. The new image would also not work in the media library since the files would be missing. It would make your old images work on the front end though. I do not recommend this option.

    Thread Starter adrian95

    (@adrian95)

    Thank you so much @ericstaytrue! The 3rd option did it! I know, you didn’t recommend it but the first plugin only changed the date of the picture, not its url, and the second plugin didn’t update the url of the picture.

    So, the wp-file-manager fixed my issue.

    Thank you again, have a pleasant day!

    • This reply was modified 6 years, 3 months ago by adrian95.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the date of an uploaded picture’ is closed to new replies.