Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Images do not refresh. #95

Closed
asmyers opened this issue May 29, 2015 · 13 comments · Fixed by #192
Closed

Images do not refresh. #95

asmyers opened this issue May 29, 2015 · 13 comments · Fixed by #192

Comments

@asmyers
Copy link

asmyers commented May 29, 2015

When including images in an asciidoc document they do not get refreshed when the
document is updated. Even if I close the tab showing the preview and reopen it the old
images are still displayed.

@mojavelinux
Copy link
Member

My first thought is whether this is an issue in Atom. We could always append a query string to the images using JavaScript to force them to reload...perhaps when the tab is opened.

@sandermak
Copy link

Running into the same issue currently; is there anything I can do to work around this problem?

@jxerome
Copy link

jxerome commented Mar 24, 2016

I have the same issue and this is quite annoying.

@mojavelinux
Copy link
Member

Does the same thing happen in the Markdown preview by chance?

@nicorikken
Copy link

Can confirm as well. A restart of Atom is needed to refresh the image. Simply toggling the preview is not enough. I've tried it with the markdown preview, and it shows the same behavior.

@mojavelinux
Copy link
Member

Perhaps we can append a timestamp to the query string of the image URL. Not pretty, but if this is a low-level issue in Atom, that might allow us to work around it.

@nicorikken
Copy link

Any idea if this would impact other forms of caching/optimization by Atom? Maybe a hash would be better (more computing though)? If the time-stamp is only updated when the plugin is toggled, I guess it should work, rather than continuously updating cached images when the preview reloads.

@mojavelinux
Copy link
Member

Can we find the upstream bug?

@ldez
Copy link
Member

ldez commented Jul 7, 2016

It's not a bug but a feature ;)
Use to optimize Atom interface.

@sandermak
Copy link

Looks like adding a querystring/fragment is what the Markdown guys did as well: https://github.com/Galadirith/markdown-preview-plus/issues/49

@ldez
Copy link
Member

ldez commented Jul 7, 2016

I have created a PR with this trick but currently the images don't reload only when they change.
It's normal.

To do automatically refresh when changed we must watch the images. Related to #136.

@ldez ldez added this to the v2.5.x milestone Jul 7, 2016
@nicorikken
Copy link

@ldez does your PR trigger continuous reloading, or on toggle? The latter would be sufficient for now as it prevents having to close Atom. Better file watching like #136 would indeed be nice.

@ldez
Copy link
Member

ldez commented Jul 8, 2016

your PR trigger continuous reloading, or on toggle

Both, if you change the document the images are automatically reload, if you only change the images you must toggle.

@ldez ldez closed this as completed in #192 Jul 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants