BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

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

Open jasell opened this issue 2 years ago • 2 comments

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

jasell avatar Jan 11 '24 11:01 jasell

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 avatar Jan 11 '24 16:01 ssddanbrown

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 avatar Jan 11 '24 16:01 jasell