Skip to main content

Sphinx extension for thumbnails

Project description

sphinxcontrib-images (formerly sphinxcontrib-fancybox).

Easy thumbnails in Sphinx documentation (focused on HTML).

Features

  • Show thumbnails instead of full size images inside documentation (HTML).

  • Ability to zoom/enlarge picture using LightBox2 (HTML).

  • Ability to group pictures

  • Download remote pictures and keep it in cache (if requested)

  • Support for other formats (latex, epub, … - fallback to image directive)

  • Easy to extend (add own backend in only few lines of code)

    • Add other HTML “preview” solution than LightBox2

    • Add better support to non-HTML outputs

    • Preprocess images

TODO

  • Make proper thumbnails (scale down images)

How to install?

Instalation through pip:

pip install sphinxcontrib-images

or through the GitHub:

pip install git+https://github.com/sphinx-contrib/images

Next, you have to add extension to conf.py in your Sphinx project.

extensions = [
          …
          'sphinxcontrib.images',
          …
          ]

How to use it?

Example:

.. thumbnail:: picture.png

You can also override the default image directive provided by Sphinx. Check the documentation for all configuration options.

Questions and suggestions

If you have any suggstions, patches, problems - please use GitHub Issues.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sphinxcontrib_images-1.0.1-py3-none-any.whl (119.7 kB view details)

Uploaded Python 3

File details

Details for the file sphinxcontrib_images-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinxcontrib_images-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc9738dc15bacb3ab153b411a1b50dbfaa2535b49853ef3eae4d22adbbffa26
MD5 7e7f7e07dcbc2859d7bc58534e4282f5
BLAKE2b-256 08c5402cce1cc18caff306effa09e77fdb3872289edc956a5c1bf53c03799b3b

See more details on using hashes here.

Supported by

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