ZhangJian1713 / vscode-image-viewer

MIT License
17 stars 6 forks source link

Refresh button doesn't seem to work #20

Closed balopat closed 6 months ago

balopat commented 7 months ago

I love the UI of your VSCode Image Viewer plugin - it looks great.

I tend to regenerate a lot of images in my workflow and inspect them. However, the panel does not refresh automatically. I'd be okay with pressing the reload/refresh button image but it doesn't seem to pick up the changes, I have to close and reopen the tab.

balopat commented 7 months ago

More precisely: the button works when there are new files or files are deleted. It doesn't seem to reload the image when only the contents change but the filename stays the same.

ZhangJian1713 commented 6 months ago

I've fixed the issue. The problem was caused by the embedded webview browser using cached images by default(no new GET request), which was beneficial for performance but prevented updates. Now, it checks the file's modify time to determine whether to cache. I'm glad this extension could help you, and I appreciate your feedback on the bug. Thank you!