How can I remove or replace images safely?

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:

Hi,

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? 

Thanks,

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 support@performancefoundry.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: 

  1. Go into the post.
  2. Remove Image A. 
  3. Upload Image A1.
  4. Insert Image A1 into the post, to display how you want it to. 
    • Related Articles

    • Troubleshooting Thumbor Images

      Normally, Thumbor works without a hitch, but there are some cases where it can be a problem: Images won't appear in some browsers Thumbor will intelligently serve the best image format to different browsers. In practise, this normally means serving ...
    • Faster images on your website

      Images are a very important consideration for site speed, since loading larger-than-necessary images is a quick way to slow your site down. Ideally, your site should load the correct sized image for the screen it's being viewed on -- and that means ...
    • Add ALT tags to images

      When inserting images to your posts or pages, you have the option to add an alt tag to the image. This is the text that will display if the image can't be loaded. It's important to add in an alt tag for all images, for two main reasons:  1. It helps ...
    • Images are missing from my thumbnails

      Thumbnails are the small images that appear in various areas of websites, for example on the homepage next to an article excerpt, or in a related posts section. In WordPress, most thumbnails are small versions of the image in the "featured image" ...
    • How large should the images I upload be?

      This is a great question, and one that's important to consider, since incorrect image sizing is the cause of most blurry images and slow image loading on websites. In the past, it was good practice to upload photos of the exact size you'd be ...