skillfed

sphinxcontrib-images

Sphinx extension for thumbnails

sphinxcontrib-images v1.0.1 86.6K downloads/30d#13,850 on PyPI23
Permissive license Apache-2.0 AGING released

What it is and what it does

sphinxcontrib-images is a Sphinx extension that enhances HTML documentation by replacing standard image directives with thumbnail previews and lightbox zoom functionality. It lets you display smaller preview images in your docs that expand when clicked, improving page load time and visual organization. The extension depends on Sphinx and requests, and works by intercepting the image directive during documentation builds.

The package supports grouping images, downloading and caching remote images, and provides fallback rendering for non-HTML formats like LaTeX and EPUB. It is designed to be extensible—you can add custom HTML preview solutions or preprocess images by writing a few lines of code. However, the TODO list notes that proper image scaling (thumbnail generation) is not yet implemented, so it currently shows full-size images in a thumbnail container rather than creating actual scaled versions.

Use it for:

  • Reduce HTML documentation page load time by showing image thumbnails instead of full-resolution images
  • Add interactive lightbox zoom to image galleries in Sphinx-generated documentation
  • Group related images in documentation with automatic preview and enlargement on click
  • Cache remote images locally during documentation builds to avoid external dependencies
  • Extend the extension with custom preview backends or image preprocessing pipelines

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Sphinx extension that replaces standard image directives with thumbnails and lightbox zoom functionality for HTML documentation output.

Yes, if you are building HTML documentation with Sphinx and want thumbnail and lightbox functionality without heavy setup. The low install friction and permissive license make it a reasonable choice. However, be aware that the project is aging (433 days since last release) and core features like actual image scaling are still TODO; verify that the current state meets your needs before committing to it in production documentation pipelines.

Install

sphinxcontrib-images on PyPI

pip

pip install sphinxcontrib-images

uv

uv add sphinxcontrib-images

poetry

poetry add sphinxcontrib-images

Installing sphinxcontrib-images

Before you install

Low friction install with only requests and sphinx as runtime dependencies. Maintenance status is aging—last release was 433 days ago, though the repository remains active with a recent commit on 2025-07-29.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and open-source projects with minimal restrictions.

Quickstart

pip install sphinxcontrib-images

Then add to conf.py:
extensions = ['sphinxcontrib.images']

In your .rst file:
.. thumbnail:: picture.png

Requires Python 3.9 or later; thumbnail generation (image scaling) is listed as a TODO and not yet implemented.

Verify before relying

  • Whether remote image caching actually works or is still in development
  • Current state of non-HTML output support (latex, epub fallback behavior)
  • Whether LightBox2 integration is fully functional or has known limitations
  • How actively the extension is maintained given 433 days since last release

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, sphinx
Maintenance aging — 433 days since the last release
Last repo commit
First released
Downloads 86,583/month — #13,850 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sphinxcontrib_images-1.0.1-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: ConsoleEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Documentation

Tags

sphinx thumbnail extensionsphinx image lightboxsphinx documentation thumbnailssphinx fancybox imagessphinx html image preview
sphinx-extensiondocumentation-tooling

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

sphinxcontrib-openapi

Sphinx extension that renders OpenAPI (Swagger)…

permissive · top 15,000 on PyPI

sphinx-panels

A Sphinx extension that adds directives for…

permissive · top 15,000 on PyPI

sphinxcontrib-video

A Sphinx extension that embeds HTML5 videos…

permissive · top 15,000 on PyPI

sphinx-substitution-extensions

Adds substitution support to Sphinx directives,…

permissive · top 15,000 on PyPI

sphinxcontrib-youtube

Adds Sphinx directives to embed YouTube, Vimeo,…

permissive · top 15,000 on PyPI

sphinx_mdinclude

Sphinx extension that lets you include and…

permissive · top 15,000 on PyPI

sphinx-hoverxref

Sphinx extension that displays tooltips with…

permissive · top 15,000 on PyPI

sphinxcontrib-typer

A Sphinx extension that auto-generates…

permissive · top 15,000 on PyPI

sphinxext-opengraph

Sphinx extension that automatically generates…

permissive · top 15,000 on PyPI

easy-thumbnails

Generates and manages thumbnail images for…

permissive · top 15,000 on PyPI