[BUG] Image preview of linked image in markdown document doesn't refresh/update when changes/edits to the actual image are made
CompletedSteps to reproduce:
- create markdown file
- place image link to an editable (e.g. local) image inside markdown file e.g. like this:
 - the preview pane shows the correct preview of the image inside the markdown file
- now: open the linked image in e.g. macOS Preview app and edit it (e.g. add a small circle or text) and save it (overwrite the old file)
- look again inside preview pane in nvUltra at the markdown file with linked image
Error:
- the image preview still shows the "old" image (before the edit)
- hitting ⌘R also doesn't help to get the image preview to update
-
I haven't looked into this on my end yet, but it's likely that the webkit instance is caching resources. If you add ?2 to the end of the image name, e.g. (image.png?2) does it update for you?
0 -
Hi Brett, yes, adding ?2 to the end of the name updates the preview of the file correctly.
0 -
All right, I'll have to look into whether the built-in web server can prevent caching. Thanks!
0 -
I'm encountering the same issue on the latest build with adding parameters working as a workaround.
0 -
I changed the cache on the server down to 60 seconds. Setting to 0 seems like overkill since the vast majority of the time, images on disk won't change. Some people need to set the preview to refresh with every keystroke, which would mean loading un-cached images with every keystroke. On the flip-side, reloading images from a local disk once a minute should not be overly burdensome on the CPU/disk.
It seems unlikely that you would be editing an image multiple times within a 60 second period, but yet needing to rely on nvUltra's preview to see the changes that you have made to that image.
0
Please sign in to leave a comment.
Comments
5 comments