withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
45.82k stars 2.41k forks source link

Make image cache constant if filename changes #11316

Closed reisi007 closed 3 months ago

reisi007 commented 3 months ago

Astro Info

Astro                    v4.11.0
Node                     v20.9.0
System                   Windows (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             @astrojs/mdx
                         @astrojs/sitemap
                         @astrojs/tailwind
                         @astrojs/solid-js
                         @jop-software/astro-matomo

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

If I rename an image. the cached files are not used for the renamed image.

What's the expected result?

I expect that the cache (at least can be configured) to use the hash (a longer version than the current hash) instead of the file name + very short hash.

This would allow me to rename files and keeping the build fast....

Link to Minimal Reproducible Example


Participation

github-actions[bot] commented 3 months ago

Hello @reisi007. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.