image icon indicating copy to clipboard operation
image copied to clipboard

staticFilename hash add md5 value or timestamp

Open w550 opened this issue 3 years ago • 1 comments

staticFilename: [publicPath]/images/[name]-[hash]${new Date().getTime()}[ext],

w550 avatar Aug 08 '22 06:08 w550

@pi0 I think this is basically what I was going to ask about as well. I noticed if I have foo.jpg and completely change it to another jpeg, but still call it foo.jpg the hash is still the same, so both end up being like 846284.jpg or whatever. This is a huge problem for caching because when I update my images, the hash never changes, and the old ones are cached forever.

Is there a way to make the hashes change per build or something? I suppose I could also clear the cache on Cloudflare and potentially fix this too, but I would expect things to be fingerprinted to cache bust when they change.

RobbieTheWagner avatar Aug 08 '22 12:08 RobbieTheWagner