An image can keep showing an old design after you replace its src address. If the element also has srcset, inspect that candidate list. It may still offer the old files, and the browser can select one of them.
Check the selected resource before exporting another copy or assuming that every stale image is a cache problem. This walkthrough uses blue old artwork and green new artwork in controlled local pages.
Inspect the new file and the saved image attributes
Open the intended replacement file and confirm its appearance. To check its dimensions, load that copy in the Image Resizer and read Original size and the Width and Height fields. Our new small PNG loads as 320 by 200. This check uses the loaded original, without resizing or exporting.
The example also has a 640 by 400 candidate for the same 320 by 200 CSS-pixel display. The guide to 1x and 2x resources explains that preparation step. Here, the problem is that the saved element mixes versions:
<img id="stale"
src="/new-320.png"
srcset="/old-320.png 1x, /old-640.png 2x"
width="320" height="200"
alt="Decorative test banner">
The src names the new small file, but both explicit candidates still name old artwork. MDN’s image element reference describes srcset as possible image sources and explains density descriptors. The browser chooses a source under its own conditions; changing one attribute does not update the other URLs.
Check which resource the browser selected
Inspect the affected image in developer tools. For the example element above, this console check compares the stored attributes with the selected URL:
const image = document.querySelector("#stale");
console.log(image.getAttribute("src"));
console.log(image.getAttribute("srcset"));
console.log(image.currentSrc);
MDN’s currentSrc reference defines that property as the full URL selected by the browser. Its presence alone does not establish that the resource loaded successfully.
Check the matching image request in the Network panel too. Confirm the final response and actual artwork. If currentSrc points to an old candidate and its response contains the old design, you have identified a source-selection problem. If it points to the intended new URL but that response is old, investigate the delivery or cache behavior for that exact URL separately.
Update the candidate URLs as one replacement set
Update the template, component or CMS field that emits the candidate list. For this example, the intended replacement is:
srcset="/new-320.png 1x, /new-640.png 2x"
Keep src="/new-320.png" and verify that both new files exist, contain the intended design and use the declared density relationship. Keep their composition and aspect ratio consistent. The resizer can inspect or prepare files; it does not edit a page’s responsive-image attributes.
Inspect the saved page again after the publishing system generates its final markup. If the image is inside a picture element, review its source candidates as well. Keep the alternative text appropriate to the replacement image’s purpose; our alt-text guide covers that separate content check.
Test the selected version under relevant display conditions
We loaded the new small file through the unchanged current resizer code locally in Chrome, then tested stale and repaired candidate lists in two fresh browser profiles. The local HTTP responses used no-store, browser caching was disabled, and each image displayed at 320 by 200 CSS pixels:
| Test pixel ratio | Candidate list | Selected response | Rendered artwork |
|---|---|---|---|
| 1 | Old candidates | /old-320.png |
Old blue |
| 1 | New candidates | /new-320.png |
New green |
| 2 | Old candidates | /old-640.png |
Old blue |
| 2 | New candidates | /new-640.png |
New green |
Every selected response returned HTTP 200. Native request bytes matched the corresponding PNG, and an independent decoder confirmed the source dimensions and painted colors. The four cases all retained the new small src value; the candidate-list change determined which version appeared in this controlled run.
These observations do not guarantee the same candidate choice for every browser, preference or network condition. On the final site, repeat the check at the layouts and display densities you support. Confirm both the selected URL and the returned image, then retain the approved replacement files and markup together.