How can I remove or replace images safely?
If you're updating posts, and would like to change some of the images within the post without causing issues through your site, that's quite easy to do.
Important: before starting this work, Performance Foundry staff will need to transfer your images from the media server to the main web server.
Please start a ticket requesting this, and explaining your use case: for example, if we only need to pull images from a certain year or month, everything else will continue to run faster. Here's an example ticket:
I'm planning to replace several images from June 2018 on example.com. Can you please pull these back to the webserver so I can do that?
I just want to remove the image from the post
If you want to remove an image from an individual post, just go into the post editor and remove the link to the photo. You can then go to your media library to upload or choose a new photo to replace it, if you like.
Don't delete the photo from your media library. If you have used this photo in other posts, it would no longer appear -- which is not a great thing!
What if I've used the same image in several posts?
The safest way to remove an image in several posts is to run a search in WordPress for the image, and then update the posts one by one. It takes time, but it's a good way to make sure all the posts are updated correctly!
What if I want to replace an image with another image?
If you would like to replace one image with another -- perhaps a larger version of the same image, or one with/without watermarks or borders, you can do that using the Replace Image plugin. Installing this plugin will add a button marked "Replace Image" in your attachment details screen. This will allow you to select an image from your media library, or upload a new one, to replace the current image -- retaining the URL and attachment ID.
Make sure to read the instructions on the plugins page ( https://wordpress.org/plugins/replace-image/) before installing. After you've installed the plugin and updated your images, send us an email at email@example.com to ask us to clear the CDN caches for you.
A note about appearance
Be aware that any replaced images may appear in the same place and size as the original image did in the past. Say for example you originally uploaded image A (600px wide) and inserted it as a right-align image of 300px wide. If you replace Image A with Image A1 (2000px wide), it will still display in your post as 300px wide.
If you want to make an editorial change, and display that image as centred, 1000px wide, you'll still need to make that change manually. So, rather than using a plugin to replace images, it's probably just as easy to:
- Go into the post.
- Remove Image A.
- Upload Image A1.
- Insert Image A1 into the post, to display how you want it to.