Skip to main content

jupyterlab_advanced_image_viewer_extension

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

A JupyterLab 4 extension that makes the built-in image viewer interactive and adds audio, video and mesh viewers. Images open fitted to the panel just like the stock viewer, then you can zoom with the wheel, pan by dragging, and step through a folder of images with the arrow keys - all in a single viewer tab.

Advanced image viewer

The viewer toolbar adds zoom in / out / fit controls and a help button that lists every keybinding.

Features

  • Fit to screen - every image opens scaled to fit the panel (same result as the stock viewer), and reset returns to that fit
  • Image fit everywhere - images in the image viewer, notebook outputs, markdown cells and HTML output shrink to fit their container with the aspect ratio kept, and keep their size when smaller; jupyterlab_fit_image_size_extension is no longer needed
  • Wheel zoom - scroll to zoom in and out, anchored at the cursor; zoom out as far as you like
  • Drag to pan - hold and drag to move the image at any zoom; the image can touch a viewport border but never leave it, the grab cursor is always available, and Fit recenters
  • Toolbar controls - zoom in, zoom out, and reset-to-fit buttons on the viewer toolbar
  • Arrow-key navigation - Left and Right open the previous and next image in the same folder, in the order the file browser lists them, advancing within one viewer instead of opening new tabs
  • Copy to clipboard - right-click a raster image (PNG/JPG/…) and choose "Copy to Clipboard" to copy it as PNG to the system clipboard
  • Refresh - a toolbar refresh button reloads the image from disk, the same control the HTML viewer provides
  • WebP and AVIF support - .webp and .avif files open in the image viewer with every feature above; stock JupyterLab does not open them and shows a File Load Error

Audio and video viewers

Audio files open in a waveform player built on wavesurfer.js and video files in a Plyr player. The extension disables the stock JupyterLab audio and video viewers, so a double click on a media file opens these instead.

Audio viewer Video viewer

  • Audio controls - under the waveform, a time row shows the played time, a seek slider over the whole file that shows the buffered part and the file length; a control row below it shows the range the waveform shows at the left, holds back 5 s, play/pause and forward 5 s in the centre, and mute, a volume slider and a speed choice of 0.5x to 2x at the right. While playback waits for data, the panel foot reads Buffering... and clears when the data arrives. The toolbar holds waveform zoom (zoom out, zoom in, reset to fit) and Loop. The waveform adds an overview strip that seeks anywhere in the file, the time under the mouse, and a drag-marked loop region of at least 1 s. Volume, mute and speed carry to the next audio file and across a page reload, as in the video viewer
  • Video controls - play/pause, a seek bar that shows the buffered part, the current time, mute and volume, a speed menu, picture in picture and full screen, in a player fitted to the panel with the aspect ratio kept
  • Keys in a focused media tab - Space plays and pauses, Left and Right seek 5 s, and Page Up / Page Down open the previous and next file of the same kind in the folder, in the order the file browser lists them (the folder navigation setting turns this off)
  • Help dialog - a help button in each media toolbar lists the keys and the waveform gestures
  • File details - the toolbar shows the format, the size and the duration, plus the channel count for audio and the frame size for video
  • Streaming - every audio and video file plays from its file URL, so playback starts before the whole file has arrived and the seek bar shows how much of the file the browser holds; seeking needs a server that answers byte ranges, as JupyterLab's own file handler does. The extension's server part computes the audio waveform with PyAV for AAC, FLAC, M4A, MP3, OGG, OPUS and WAV files, so the server part must be enabled; the install enables it, and jupyter server extension list shows it. The server keeps each waveform in the user cache folder ($XDG_CACHE_HOME/jupyterlab_advanced_image_viewer_extension, or ~/.cache/jupyterlab_advanced_image_viewer_extension when XDG_CACHE_HOME is unset, at most 1 GiB), so the next open of an unchanged file draws at once, also after a server restart. While the server computes, a spinner stands in the waveform's place and the file already plays. Without a waveform the time row with its seek slider and the control row stay. A WebM recorded in a browser with no length in its header shows --:-- and cannot be seeked

Mesh viewer

Mesh files open in a 3D viewer built on three.js, with STEP read by occt-import-js. The extension registers the mesh file types, so a double click on a mesh file opens this viewer.

Mesh viewer

  • Formats - STL, PLY, OBJ, 3MF, GLB and STEP
  • Controls - hold the left button to orbit, the right button to pan, and the wheel to zoom at the cursor; the toolbar buttons are icons - Reload reads the file again and keeps the camera, Zoom out, Zoom in and Fit zoom and frame the model, the Shading toggle (on by default) shows the smooth surface and turns it off to show the flat facets, Wireframe shows the triangle edges, Grid shows the ground grid, Orthographic switches the projection, Views picks a standard view and Lighting picks a lighting style
  • Standard views - Front, Back, Right, Left, Top, Bottom and the four isometric corners, one at a time; a view is not carried to the next file
  • Lighting styles - Studio (the default), Neutral and Three-point
  • Grid - off by default; its lines are drawn in theme colours that reach 3:1 against the panel
  • Projection - perspective by default; the Orthographic toggle keeps the model the same size and centred
  • Read-out - the toolbar shows the format, the triangle count, the dimensions and the size
  • Keys in a focused mesh tab - Page Up / Page Down open the previous and next mesh file in the folder, in the order the file browser lists them (the folder navigation setting turns this off)
  • Help dialog - a help button in the mesh toolbar lists the controls
  • 1 GiB limit - a file up to 1 GiB is downloaded and shown; above 1 GiB the file is not downloaded and the viewer says so
  • STEP files - occt-import-js reads them under LGPL-2.1 in a Web Worker; the WASM file ships in the wheel, and no request leaves the lab host

Requirements

  • JupyterLab >= 4.6
  • Python >= 3.12

Install

To install the extension, execute:

pip install jupyterlab_advanced_image_viewer_extension

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_advanced_image_viewer_extension

Metadata

Release files for jupyterlab-advanced-image-viewer-extension 1.2.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterlab-advanced-image-viewer-extension 1.2.13
File Size Uploaded Provenance Actions
jupyterlab_advanced_image_viewer_extension-1.2.13.tar.gz 10.6 MB Without provenance Details for jupyterlab_advanced_image_viewer_extension-1.2.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-advanced-image-viewer-extension 1.2.13
File Interpreter ABI Platform Actions
jupyterlab_advanced_image_viewer_extension-1.2.13-py3-none-any.whl Python 3 none any Details for jupyterlab_advanced_image_viewer_extension-1.2.13-py3-none-any.whl

Total release size: 19.9 MB

Release files / jupyterlab_advanced_image_viewer_extension-1.2.13.tar.gz

Download URL jupyterlab_advanced_image_viewer_extension-1.2.13.tar.gz
Size 10.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e14753da064d82dcba1ddccd0c0d9f3f6f662e92cdbb51c5b785d1ef1d0bd022
BLAKE2b-256 checksum
How to use checksums
8f8c13f7b1b7720db529bb2293a4794ccc2e88337188f5aa3d05df8e33ab08c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / jupyterlab_advanced_image_viewer_extension-1.2.13-py3-none-any.whl

Download URL jupyterlab_advanced_image_viewer_extension-1.2.13-py3-none-any.whl
Size 9.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8cae8aac41f92b5d88707a21d7d40cdc43d463a2e3ad702293131f943fe193ac
BLAKE2b-256 checksum
How to use checksums
8bb039458ee9c18c15cb55225bdf476fcdcd83503cbfa86031b437544374068c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for jupyterlab-advanced-image-viewer-extension 1.2.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.13 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page