Something weird with my images in www

I have automations that take snapshots from various cameras (when movement is detected). When I use the file editor to view them they are the correct file, and when I send them with a notification everything works fine.

The problem is that when I add them as a lovelace card, it isn’t the correct picture. It is a picture from a couple of months ago.

Am I missing something?

Browser caching issue?

I thought of that, I guess I should try clearing the cache.

My understanding is that when you hold shift and refresh it refreshes the cache, which I have done several times. I’m not sure how reliable that is though. Also, this has been happening for a couple of months, which doesn’t seem right.

If the images have exactly the same filename, your browser will cache them. This is not a bug.

I had problems with this when I tried to embed a gif that is changing every 10 minutes in a markdown card. I had to include a changing number in the URL to prevent the browser from caching it.

[![radar.bourky.cz][bourky gif]][bourky link]
{% set cacheTimestamp =  (((now() | as_timestamp) - 310) / 600) | int %}

[bourky gif]: https://www.bourky.cz/wp-content/uploads/pacz2web.gif?{{ cacheTimestamp }}
[bourky link]: http://radar.bourky.cz/

Interesting, I have always wondered if it was just a cache issue. It worked as intended for months, so I don’t know what would have changed.

Yep, that did it. I manually cleared the cache and the photos updated… I don’t know why it worked the way I wanted and it changed recently. Maybe a change in Chrome?

I guess I will have to figure out a new system.