Lorixen.
EN

Replaced a Photo but Visitors Still See the Old One? Choosing How to Clear Cloudflare and Browser Caches

Short answer: An old photo usually survives because one of three caches still holds it: your own browser, the Cloudflare edge servers, or a caching plugin on the origin server. Overwriting a file but keeping its name is the root cause, because every cache is entitled to keep serving what it already has. The most dependable fix is to give changed files a new name or a version query, so nothing needs clearing. When you cannot, purge just the changed URL in Cloudflare, then clear the plugin cache, then hard-reload the browser.

First, find which cache is lying

Do not purge everything at once. Work out where the stale copy lives, so you fix the right layer and learn for next time.

  1. Open the image URL directly in a private window. If the new picture shows, only your own browser cache was stale.
  2. Open the browser developer tools, Network tab, and tick Disable cache. Reload and click the image request. Look at the response headers.
  3. In the headers, cf-cache-status: HIT means Cloudflare served its stored copy. MISS or DYNAMIC means it fetched from your server. Age shows how many seconds the stored copy has been held.
  4. If Cloudflare shows MISS but the picture is still old, the origin or a plugin is serving it, so look at the server side.

Decision table: which fix suits which situation

Situation Best fix Effort Downside
A single photo replaced, same filename Purge that URL in Cloudflare, then hard reload Low Visitors with the old copy in their browser may keep it until it expires
Stylesheet or script edited often Version the filename or add ?v= that changes on each deployment Medium to set up once Needs your build or theme to generate the version
Whole redesign launched Purge everything once, after the files are live Low Short spike of load on your server while the edge refills
Photos change monthly (menus, offers) Upload under a new filename each time Low Old files accumulate and need tidying
You do not control the origin Set a short edge cache time for that path with a Cache Rule Medium More requests reach your server
Browser keeps old file for a long time Lower max-age on files that change, keep it long on files that never change Medium Slightly slower repeat visits for changing files

Option 1: purge a single URL in Cloudflare

In the Cloudflare dashboard, open your domain, then Caching, then Configuration, and look for the purge options. Choose a custom purge and paste the full URL, including https:// and the exact path. The match is exact, including the query string, so photo.jpg and photo.jpg?w=800 are different cache entries. If your theme creates several sizes of an image, each size has its own URL and each needs purging. As of November 2026 the dashboard labels may differ slightly from this description, so check the linked Cloudflare documentation for the current wording.

Use the purge-everything button as a last resort. It empties all stored files, so your server must rebuild every one on the next visit, which on a small hosting plan can cause a slow few minutes.

Option 2: stop the problem with versioned names

If you upload shop-front-2026-11.jpg instead of overwriting shop-front.jpg, every cache sees a brand-new file and fetches it. No purge is needed. For stylesheets and scripts, most build tools append a fingerprint such as app.3f9a1c.css automatically. On WordPress themes, check whether the theme or a performance plugin has an option to append file modification times as the version query. Be aware that some caching layers ignore query strings; a changed filename is the safest.

Option 3: use sensible headers

Every response can carry a Cache-Control header that sets how long browsers and edge servers hold on to a copy. Two simple policies cover most small sites:

  • Files whose names are unique to their content (fingerprinted or dated): a one-year lifetime marked immutable.
  • Files that keep the same name but change sometimes: a short life such as max-age=3600, or no-cache, which tells the browser to ask the server whether its copy is still current.

Never pair a year-long lifetime with a file you overwrite in place; visitors' browsers will cling to the old one for months. Cloudflare also has its own edge cache time and a Browser Cache TTL setting, and they can override the origin header depending on your configuration, so look at both when results seem odd.

Option 4: clear the plugin and the origin

On WordPress with a caching or image optimisation plugin, there may be a stored resized copy or a WebP conversion of your old image. Replace the original, then use the plugin's clear cache button, and regenerate thumbnails if the plugin offers it. On a managed host, there is often a separate server-level cache with its own clear button in the hosting panel. Clearing Cloudflare while the origin still holds the old file just refreshes the edge with the same old picture.

A routine to follow every time

  • [ ] Upload the new file, preferably with a new name.
  • [ ] Update the page or post so it references the new name.
  • [ ] Clear the origin or plugin cache.
  • [ ] Purge only the changed URLs at Cloudflare.
  • [ ] Check the URL in a private window with Disable cache on.
  • [ ] Check on a phone using mobile data, which has a different cache from your laptop.
  • [ ] Confirm cf-cache-status and Age headers look as expected.

Cache Rules for a path that changes

If a folder such as /menu/ holds files you overwrite weekly, create a Cache Rule that matches that path and sets an edge TTL of a few minutes, or bypass cache entirely for it. Narrow rules are better than switching caching off across the whole site, which would throw away the speed that Cloudflare provides.

FAQ

How long until a purge takes effect?

Cloudflare states that purges are applied quickly across its network, but your own browser still obeys its stored copy, so hard-reload as well.

Does Development Mode help?

It temporarily bypasses the edge cache for testing, which is useful while you edit, but it does not clear browser caches and it switches itself off after a few hours.

Why does the old image show on one phone only?

That phone's browser or app has its own stored copy. A changed filename solves it for every device at once.

Is a query string like ?v=2 reliable?

Browsers treat it as a new URL, and Cloudflare does by default, but some plugins strip it. A new filename never fails this way.

If your updates keep appearing late and you would like a clean caching setup, get in touch through our enquiry page.

Sources

WhatsAppBook a call