Skip to main content

Sphinx Extension that creates responsive images.

Project description

sphinxext-photofinish

Photofinish is a sphinx extension for creating responsive images to your Sphinx site. This has several benefits:

  • Lower bandwidth cost for browsers and devices that don't need the higher resolution version
  • Higher resolution images for higher resolution devices

Photofinish can dramatically increase the loading time of your Sphinx website.

Installation

python -m pip install sphinxext-photofinish

Usage

Just add sphinxext-photofinish to your extensions list in your conf.py

extensions = [
    "sphinxext.photofinish",
]

Configuration

Photofinish adds several conf.py options that you can optionally configure:

max_viewport_width - This is maximum "viewable" size of images in your documentation. Typically, it's set to the width of your body. Responsive images are generated up to double of this value. Default is 1000.

width_min - Minimum width of images to generate. Default is 500.

width_step - The resolution to iterate over for generating images. EX: 500, 800, 1100. Default is 300.

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

sphinxext-photofinish-0.1.6.tar.gz (11.3 kB view hashes)

Uploaded Source

Built Distribution

sphinxext_photofinish-0.1.6-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

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