01

The URL is part of the cache key

A public path such as /images/work/project.png can keep the same address across deployments. If an upstream cache considers that response fresh, replacing the bytes alone may not invalidate it.

02

Use static imports for build-time screenshots

When an image is imported from source code, Next.js emits a content-hashed asset. Replacing the image produces a different output filename, so a new deployment naturally references a new URL.

  • Import local images into the content configuration
  • Let Next/Image generate responsive formats
  • Avoid manually cache-busting stable public URLs
03

Still clean the build output

A clean .next directory prevents an older local build from being reused by the CI job. Your deployment process should also copy both the standalone server and .next/static assets when using standalone output.