When replacing an image the new image is not shown until you do a page reload
Describe the Bug
When replacing an image the new image is not shown until you do a page reload
Steps to Reproduce
- Go to the image library
- Select an image, and select to replace the image
- Browse for a new image and select it, see the notification as confirmation
- Wait for the notification to fade out, now your new image is no long visible
- Do a page reload to see the image update
- open the image archive again and see your update 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
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.
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.