jupyterlab_fit_image_size_extension
v1.0.4
Published
Jupyterlab extension to fit image to view size when image too large, and leave it as-is when smaller. This applies to all raster images (png, jpg etc..) and vector images (svg etc..)
Maintainers
Readme
jupyterlab_fit_image_size_extension
Automatically scales images to fit within the view when they exceed container dimensions, while preserving original size for smaller images. Applies to both raster formats (PNG, JPG) and vector formats (SVG).
Full disclosure: This extension is mass-produced mediocrity at its finest. It does one thing that probably should have been a default setting. No configuration, no options, no preferences panel - just CSS that your browser was already capable of applying. You're essentially installing a stylesheet. Revolutionary. We're almost ashamed of it. Almost.
Features
- Automatic image scaling - Large images are scaled down to fit within view boundaries
- Preserves small images - Images smaller than container remain at original size
- Raster format support - Works with PNG, JPG, GIF, and other raster formats
- Vector format support - SVG images also respect container bounds
- Notebook outputs - Handles images in code cell outputs
- Markdown cells - Images in markdown cells are also scaled
- Standalone viewer - Works when opening image files directly in JupyterLab
- Zero configuration - Just install and forget
Installation
Requires JupyterLab 4.0.0 or higher.
pip install jupyterlab_fit_image_size_extensionUninstall
pip uninstall jupyterlab_fit_image_size_extensionLicense
BSD-3-Clause
