Skip to main content

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

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab_fit_image_size_extension-1.0.4.tar.gz (146.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyterlab_fit_image_size_extension-1.0.4.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_fit_image_size_extension-1.0.4.tar.gz
Algorithm Hash digest
SHA256 1948a3c9a184cc68032a666c85929ea8b5bbea2d87b8bf249c1d0a883d196a2b
MD5 0e076af821ac63ad040f5d73ad586193
BLAKE2b-256 141dc697b867e979ec02160e0b36d141f46efc0cfb35559b294b1c912aa06d3b

See more details on using hashes here.

File details

Details for the file jupyterlab_fit_image_size_extension-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_fit_image_size_extension-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 86370100b158e4f8d4f15ceeefca814dd8ed0e349547c29fb30748a21e71647c
MD5 37466b3c2bde3273afe85d32c1d8efcf
BLAKE2b-256 147e67ad3e492a469d4c09299aa72c05562128151105d9c7b49e79e1a77e892f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page