When replacing an image the new image is not shown until you do a page reload #4399

Open
opened 2026-02-05 08:48:04 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @jasell on GitHub (Jan 11, 2024).

Describe the Bug

When replacing an image the new image is not shown until you do a page reload

Steps to Reproduce

  1. Go to the image library
    image
  2. Select an image, and select to replace the image
    image
  3. Browse for a new image and select it, see the notification as confirmation
    image
  4. Wait for the notification to fade out, now your new image is no long visible
    image
  5. Do a page reload to see the image update
    image
  6. open the image archive again and see your update image
    image

Expected Behaviour

As the new image is loaded it should update both in the image archive and throughtout in my page

Screenshots or Additional Context

No response

Browser Details

Win 11, Chrome

Exact BookStack Version

Demo page

Originally created by @jasell on GitHub (Jan 11, 2024). ### Describe the Bug When replacing an image the new image is not shown until you do a page reload ### Steps to Reproduce 1. Go to the image library ![image](https://github.com/BookStackApp/BookStack/assets/9511987/f7377cce-7c5b-4a60-b261-7c804a8daf4d) 2. Select an image, and select to replace the image ![image](https://github.com/BookStackApp/BookStack/assets/9511987/bc222dc7-8139-46f8-a337-b7bc6fc5ebe1) 3. Browse for a new image and select it, see the notification as confirmation ![image](https://github.com/BookStackApp/BookStack/assets/9511987/9efd160c-fcf6-4da5-be16-9f6a38107694) 4. Wait for the notification to fade out, now your new image is no long visible ![image](https://github.com/BookStackApp/BookStack/assets/9511987/7b165960-e558-453a-a1d6-b6382466ec64) 5. Do a page reload to see the image update ![image](https://github.com/BookStackApp/BookStack/assets/9511987/98a28eb9-0f6d-41f9-af83-eab54c4aa405) 6. open the image archive again and see your update image ![image](https://github.com/BookStackApp/BookStack/assets/9511987/9e245eb5-d491-469a-8fdf-2f0352bcaae0) ### Expected Behaviour As the new image is loaded it should update both in the image archive and throughtout in my page ### Screenshots or Additional Context _No response_ ### Browser Details Win 11, Chrome ### Exact BookStack Version Demo page
OVERLORD added the 🛠️ Enhancement💆 UX labels 2026-02-05 08:48:04 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 11, 2024):

Hi @jasell,
Yeah, this is is known side affect of performing an in-place change of image, where caching is active.
We could add cache-invalidating query additions to these, but that's getting pretty hacky, especially for images used in-content already, outside of the image manager itself.
Otherwise, there could be other options with certain image storage options we provide, but not sure I'd want to add that complexity for a minor element.

Could be something best pracitally solved to added wording to advise of this scearnio, warning the user old images may be shown for a little while.

@ssddanbrown commented on GitHub (Jan 11, 2024): Hi @jasell, Yeah, this is is known side affect of performing an in-place change of image, where caching is active. We could add cache-invalidating query additions to these, but that's getting pretty hacky, especially for images used in-content already, outside of the image manager itself. Otherwise, there could be other options with certain image storage options we provide, but not sure I'd want to add that complexity for a minor element. Could be something best pracitally solved to added wording to advise of this scearnio, warning the user old images may be shown for a little while.
Author
Owner

@jasell commented on GitHub (Jan 11, 2024):

A simple solution could be to notify the user to do a page reload or F5 to see the effect of the update image.
The Message could be visible until the page is reloaded.

@jasell commented on GitHub (Jan 11, 2024): A simple solution could be to notify the user to do a page reload or F5 to see the effect of the update image. The Message could be visible until the page is reloaded.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4399