Bug: Changing Image

I’ve seen i.e. Refresh Cached images in Lovelace Picture-Elements (maybe other places too) but while some workaround, it ain’t smart.

I’d like to add a default background each to dashboards for the family-members. But when I i.e. use “hername.jpg” as a name and upload a new file to override the previous one, even after a restart, Home Assistant shows the old image background. So obviously there is some caching in place that simply ignores the admin or user input? That is a big-mother-mentality: Mother knows best? Naw.

So to solve this, 2 1/2 workarounds seem reasonable.
Option 1.a: Refresh that hidden image cache using a command or button or whatever.
Option 1.b.: Refresh that hidden image cache when restarting HA.
Option 2: Use the file from the local directory as given without cache inside the HA frontend.

Option 3: Frustrating users researching to find stupid workarounds like changing an added parameter like ?v=1? I don’t want to change any parameter, I want to replace the image and not bother, HA should show the new image automatically without forcing me to adjust the different dashboards and tabs.

Example: My daugher loved Harley Quinn. Now she wants something different. I’m sure she’ll come in a few weeks again asking to change it. And no, I don’t want to open pandora’s box and have them change it themselves, they should just use their dashboards.

To me this sounds like a browser cache problem :thinking:
Have you tried clearing it or use anonymous/incognito mode ?

As mentioned, I (also) assume it is a caching problem, which works on all kinds of devices, Windows, Linux, Android, Apple, browser, HA app… That’s why I referred to mentioned options. And no, I don’t bother telling my kids to use HA in “anonymous” mode or even trigger their attention to that?

I am seeing similar behavior. This code works, when the browser is refreshed, a new image is displayed:

views:
  - title: Home
    background: >-
      center / cover no-repeat fixed
      url('http://picsum.photos/1920/1080?random=2')
    type: custom:grid-layout

However, change it to this:

views:
  - title: Home
    background: >-
      center / cover no-repeat fixed
      url('/local/www/wallpaper.jpg')
    type: custom:grid-layout

Getting it to refresh is a nightmare. I have a script that replaces the image every hour, script works fine, image is updated. Browser refresh does not update the image. Hard refresh, open and close the browser, nothing. Chrome on Windows kept an image from 7 pictures back.

Searching this issue a bit, there are different people having similar issues, its just phrasing, and suggestions to add radom strings at the end of the URL. Which didn’t work in my case.

Sure, its related to the browser cache, but why does the web hosted one work, and the local one not so much.

I changed the URL to: http://homeassistant.local:8123/local/wallpaper.jpg

But as you can see, its still caching wonky… I need a way to append a random string at the end of the URL to force the brower to not have it in cache:

Control+R in Chrome does not update the image.

Try using “image” entity instead of a url to an image.