streetwriters / notesnook

A fully open source & end-to-end encrypted note taking alternative to Evernote.
https://notesnook.com/
GNU General Public License v3.0
9.21k stars 554 forks source link

Cache Images Locally #4597

Open streetwriters[bot] opened 4 months ago

streetwriters[bot] commented 4 months ago

I used the web clipper to download a tutorial that I wanted to go through on a flight without WiFi. Since I had only used the client while connect I didn't realise that images aren't cached. It seems different to notes where I added the images directly.

Device information: App version: 2.6.17-ad99c87-desktop OS: OS X 10.15.7 Browser: Electron 25.9.8 Pro: true

fletchjeff commented 4 months ago

Hi there, this was my report. Still new to Notesnook and learning how this all works. I used the web clipper on this article. Works great when connected, but it seems the the images are fetched each time I open that note. If I specifically download the image and place it in the note, it behaves differently.

These were my settings when I clipped the article:

clip

Here is the same image (of a table) embedded in the article twice while I'm connected. The top one is from the web clipper, the bottom is the one I downloaded from the page and manually added to the note:

online

If I disconnect my network and reopen the note, the first image is not available:

offline

The Notesnook client treats these images differently.

Web/remote image:

web

Local image:

local

Apart from the issues of viewing the images when offline, I can't trust that those online sources will always be there, so I'd like to be able to force those images to change from web/remote to local without having to download them individually and then add them to the note. Is there an easy way of doing that?

Thanks, Jeff.

fletchjeff commented 4 months ago

Here is the html for the web/remote image:

image

And the local image:

image

Is there a way of automating the process for converting web/remote images to local blobs?