How to force images to update in SharePoint Online

This is a quick tip on how to update images in modern SharePoint sites that won’t update or refresh

This is a quick tip for anyone who has noticed when they update images in modern SharePoint sites that they don’t seem to update.

I’ve recently been doing a lot more authoring/ page editing in modern SharePoint and a small quirk I have noticed is around images. Usually, if you update an image and overwrite the original a forced browser refresh (CTRL+F5) does the trick – the image will update to show the newest version.

The problem

I’ve been doing the exact same thing in a SharePoint communication site recently and noticed that the updated image would not display – no matter how many times I force refreshed the browser, no matter which browser I use (I flit between Chrome and Edge Chromium quite a lot). The image(s) were saved in the Site Assets Library, not weren’t checked out either so no reason why they would not display once overwritten.

The image (product, right) doesn’t update to reflect the changes made in SharePoint.

The solution

I’ve found a really simple way to get around this:

  • Right-click on the image > Open the image in a new tab
  • Force refresh (CTRL + F5) the image in a new tab
  • Navigate back to the SharePoint communication site > force refresh (CTRL + F5) again
  • The image will now be displayed as expected
Opening the image in a new tab or window then force refreshing will update the image on the SharePoint page.

If anyone else has come across this issue, or found any other ways to solve it – let me know in the comments!


12 responses to “How to force images to update in SharePoint Online”

  1. I have antoher workaround for the cache problem. You can use my solution in combination with Powershell to automate this. Super cool.
    If you want self updating images on a Sharepoint page:
    ->The Problem: You use the basic Image-Web Part from sharepoint. You linked the image with the Web-Part. If you replace the image (keep same name and same link) the picture will be updated but the cache will keep the old picture until you delete the webpart and create the same thing… But you dont want to delete and renew the web part manually or delete any cache manually Because you are a smart person!
    -> Here the solution:
    Dont use the Basic Image Web-Part!
    Create a PowerApp instead. Just create a new app, just insert the Image Element. The picture source ist the same link as before with the webpart. With a little difference: Add this at the end of your link: ?v=” & Rand()
    Example:
    https://company.sharepoint.com/sites/Intranet/Documents/Examplesite/pic001.jpg?v=” & Rand()
    After this step ( this is a litte bit tricky) just try and error with the position and size of the image so it will presented in the correct size. Takes a little time…
    (For your information about the ?v=” & Rand(): This will create a random number on the link. And every time you open the website with the powerapp (the image) on it, PowerApps will reload every time automatically and create a link with a random number. So every time you will get a new link (but same image) and this is why the cache can not safe this! And this is exactly what we want)
    Thats it.
    Now you can add the PowerApps-Webp-Part on your Sharepoint Side on the place where your basic image webpart was.
    Summary:
    -> Dont use the Image Webpart
    -> Use a PowerApp for this
    -> The PowerApp: Just a simple Picture with the added Link to your Image.
    -> Then you can use the PowerApp Web-Part to present the Image on your Sharepoint website.
    (If you want to automate the picture replace process, just use PowerShellScript to Copy the images from the source to your destination folder.
    You can “map” the Sharepoint folder with One-Drive on your PC (There is a Sync Button on the sharepoint folder for this) so you can see this folder on your drive, that makes it easier handling for your Powershell Script 🙂 ) Just ask ChatGPT…. or copy my whole comment into ChatGPT and let chatgpt explain this…. 😀
    I hope this will help someone.
    Take this Microsoft!
    Greetings from Germany.

  2. Melissa Brown Blaeuer Avatar
    Melissa Brown Blaeuer

    I have definitely crossed paths with this issue and your workaround is novel and interesting. I will try it. What I have been doing is DELETING the image and waiting about 45 minutes for it to clear the BLOB CACHE on the distributed server network until the image no longer displays on the page, THEN I upload the new image with the same name to the same location so it re-uptakes. This is the only workaround I have been successful using, and it has a major flaw in that the image will be broken on the page at some undefined moment between the old image clearing the cache and the new image being posted. This is a real problem caused by SharePoint Online trying to optimize page load performance using BLOB CACHE image replication.

  3. The picture is not showing so how does this force it? The picture shows next to the persons name in Entra and azure its in the librabray just not showing on the Sharepoint intranet page 😦 Even microsoft can’t give me an answer

    1. Hi Doreen, thanks for the comment. My example relates to images I’ve uploaded to SharePoint, not stock ones or what sounds like people’s profile photos in Entra. That is unrelated to the issue I faced when writing this.

  4. I tried your trick and was hoping it would solve, but the old images continues to remain. Are you still running into this or have learning anything new?

    1. Hi, thanks for the comment! For me this still gets round the issue and I know others left comments to say it worked for them too. Have you tried browsing the images in incognito mode or in private browsing to see if they update?

      1. I have. It seems like on the homepage it take about 24 hours for the image to be fully replaced.

  5. That works for the people who knows the trick
    but is there a way to make sharepoint do it by itself?

    I mean, it is not a practical solution because the audience of the site won’t know when someone made an update and they will not be doing that trick all the time.

    1. Hi Hector, I would say it’s more of an issue for SharePoint Online than something we the consumers need to figure out a way around, this was purely to document how I forced images to refresh when observing they weren’t updating.

      Thanks,
      Anthony

  6. […] Browse: Three column section consisting of images, text and button web parts. I used the images from the look book template to get the correct sizing for the images above. When updating the images I noticed they didn’t update immediately which I wrote about how to fix here. […]

  7. Thank you! I wasted hours on this issue.

    1. Same! Glad to hear it’s helped someone else

Leave a Reply

Recent posts

Discover more from SharePoint Stuff

Subscribe now to keep reading and get access to the full archive.

Continue reading