←back to thread

384 points ingve | 1 comments | | HN request time: 0s | source
Show context
egeozcan ◴[] No.41877482[source]
I copy the images in my clipboard and save them in an HTML file to have single-file galleries:

https://gist.github.com/egeozcan/b27e11a7e776972d18603222fa5...

Live:

https://gistpreview.github.io/?b27e11a7e776972d18603222fa523...

Selecting via file-picker works too. Dragging usually does not. When all works, images are inserted inline as blobs.

After adding images, if you save the page (literally file->save), the blobs are saved together. don't want a part when saving (for example, removing images)? inspect element, remove, save page.

throw the page on some server or just double click on your computer/mobile.

replies(6): >>41877598 #>>41877626 #>>41877827 #>>41880026 #>>41880857 #>>41887514 #
simonw ◴[] No.41880857[source]
That's really neat!

You could add a "Download this page" button on the page which does some tricks to produce an HTML file with the images baked in that the user can download, which could work on mobile.

Here's a quick prototype: https://gistpreview.github.io/?14a2c3ef508839f26377707dbf5dd... - code here: https://gist.github.com/simonw/14a2c3ef508839f26377707dbf5dd...

replies(2): >>41881462 #>>41886272 #
1. egeozcan ◴[] No.41881462[source]
Thank you! Great idea, I'll give it a try :)