Show HN: Dietnb – Prevent Jupyter notebooks from bloating with Base64 images

2 JinLover 0 6/5/2025, 10:03:01 PM github.com ↗
Hey HN!

I've been frustrated by huge Jupyter notebooks bloated with Base64-encoded images, making them sluggish in VSCode and causing frequent connection drops when working remotely.

To fix this, I created "dietnb", a tiny Python library that automatically saves plots as external image files instead of embedding them as Base64. Images then appear neatly as Markdown-linked images (`![]()`), drastically shrinking notebook size.

Currently supports VSCode and standard Jupyter environments (Colab support appears tricky).

Quick start:

pip install dietnb

dietnb install

Then simply plot anything as usual!

Smaller notebooks should also help workflows using AI or diff tools.

GitHub → <https://github.com/JinLover/dietnb>

Feedback and suggestions are welcome!

Comments (0)

No comments yet