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..)
Project description
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_extension
Uninstall
pip uninstall jupyterlab_fit_image_size_extension
License
BSD-3-Clause
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyterlab_fit_image_size_extension-1.0.4.tar.gz.
File metadata
- Download URL: jupyterlab_fit_image_size_extension-1.0.4.tar.gz
- Upload date:
- Size: 146.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1948a3c9a184cc68032a666c85929ea8b5bbea2d87b8bf249c1d0a883d196a2b
|
|
| MD5 |
0e076af821ac63ad040f5d73ad586193
|
|
| BLAKE2b-256 |
141dc697b867e979ec02160e0b36d141f46efc0cfb35559b294b1c912aa06d3b
|
File details
Details for the file jupyterlab_fit_image_size_extension-1.0.4-py3-none-any.whl.
File metadata
- Download URL: jupyterlab_fit_image_size_extension-1.0.4-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86370100b158e4f8d4f15ceeefca814dd8ed0e349547c29fb30748a21e71647c
|
|
| MD5 |
37466b3c2bde3273afe85d32c1d8efcf
|
|
| BLAKE2b-256 |
147e67ad3e492a469d4c09299aa72c05562128151105d9c7b49e79e1a77e892f
|