weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.84k stars 187 forks source link

Updated images not propagating #367

Closed betweenbrain closed 1 year ago

betweenbrain commented 1 year ago

Hello,

Thank you for providing this fantastic service, it's very generous of you to do so and benefits more people than you can imagine. ❤️

We've been using it for a few years now and just noticed that user profile images, which are automatically renamed to always be the same file name, are not updating when requested via https://images.weserv.nl/. For example, the old version of one can be seen at https://images.weserv.nl/?url=https://www.guggenheim.org/wp-content/uploads//userphoto/285.jpg with the new one at https://www.guggenheim.org/wp-content/uploads//userphoto/285.jpg

Any thoughts on what may be causing this?

betweenbrain commented 1 year ago

I had thought the cause of this issue was a small typo on our end, the image path that we were generating had two forward slashes in it, but correcting that did not resolve this.

andrieslouw commented 1 year ago

Hi, there are some layers of caching on our end, please read the 3/4 sections that explain this from this link: https://images.weserv.nl/faq/#if-images-are-modified-do-you-refresh-them-after-a-certain-period-of-time

Not only do we cache, CloudFlare does too, and your browser. It saves your webserver some work, and the internet would be a lot slower without caching.

It is best practice that you change the URL when the content changes, this is what the big guys do too (social networks etc).

betweenbrain commented 1 year ago

Hello @andrieslouw. Thank you for the detailed response!