HappenApps / Quiver

Quiver documentation and issue tracker
2.26k stars 109 forks source link

Feature Request: fetch online images to local in note #1315

Open zshbleaker opened 5 years ago

zshbleaker commented 5 years ago

I use Quiver to make a local copy of webpages w/ Quiver Web Clipper and save the page permanently. However, the note created by the clipper find images via its online ur but not save it to the resource folder inside the note bundle file and use it via local url.

If the image got deleted on server, it will not be available in the note as well, some times the whole web page is deleted from web as well.

But if all images are stored in user's hard drive, they'll be always there unless the user delete them manually. One of the reason I love Quiver over all other notes services is that it doesn't depend on any other web services.

Please add an option to fetch all images in a note to resources folder and convert all the online url to local url. This will make Quiver even more trustable for users.

Thanks for the hard work.

ylian commented 5 years ago

The web clipper only sends the HTML to Quiver, but when you open the note in Quiver, online images will be downloaded and saved locally, just like any other text notes.

zshbleaker commented 5 years ago

@ylian Thanks for your quick reply. I noticed that images in a .qvnote/content.json created by clipper looks like:

<img src="https://example.com/figure.png"/>

while the image in a .qvnote/content.json created by myself looks like:

<img src=\"quiver-image-url/figure.png/>

And Quiver will make a copy of figure.png in .qvnote/resources/figure.png

There is no resources folder in .qvnote and the reference of the image is still <img src="https://example.com/figure.png"/>, not the same as the text note I manually created.

ylian commented 5 years ago

@zshbleaker Hmm, it does work for me. I just tested with this page: https://www.sciencenews.org/article/only-third-longest-rivers-run-free-earth?tgt=nr

I clipped as text, not Markdown.

zshbleaker commented 5 years ago

@ylian I clipped the page as text, this is the note in Quiver:

image

And this is the .qvnote bundle file, no resources folder:

image

And this is the tag in content.json:

image

Both Safari and Chrome extension works in this way on my computer.

ylian commented 5 years ago

Aha, I see. Auto saving of online images is only triggered in the editor mode. What complicated things further is that images loaded in the preview mode have the same URL, so the editor will just use those images, instead of downloading them again (which is when online images are saved locally). You can test this by switching to the editor mode, quit and reopen Quiver, and images in this note will be cached locally.

This behaviour certainly needs to be improved. So leave this ticket open.