C2DH / journal-of-digital-history

frontend app for our Digital Journal
GNU General Public License v3.0
20 stars 4 forks source link

Reduce size of jupyter notebook streamed from our proxy #474

Closed danieleguido closed 1 year ago

danieleguido commented 2 years ago

In jupyter notebooks, images a re stored as base64 strings. The bigger they are in size, the heavier they are. As many images are already stored on github, one quick solution would be to remove the cell output of each cell containing a remote loaded image. This should be done in a proxy - so that we can safely cache the result in our local nginx. Images can then be lazy loaded (If we keep the info about the image width and height in px the lazy loading would be even better looking)

eliselavy commented 2 years ago

Need to look at this also https://github.com/arve0/ipynbcompress

biumiamy commented 2 years ago

this will help to reduce the size of the img & gifs - by using webp https://pypi.org/project/webp/