Skip to main content

Photoweb

Photoweb creates HTML galleries based on in-photo metadata, using flexible templates. What's different about it?

  • It's easy to add new photos; just drop them in the folder and re-run.
  • You don't have to track metadata; it comes from the photos themselves, using standard embedded metadata (EXIF, IPTC, XMP).
  • Automatic Optimization: It can optimize your images for the web, stripping unnecessary metadata and using perceptual quality search to minimize file size.
  • Smart Orientation: Automatically handles photo orientation (fixing rotated images from phones/cameras).
  • It includes specialized support for titles and descriptions from Apple Photos.
  • It's easy to modify the templates to make your photos look great.
  • It supports modern web features like dark mode, keyboard navigation, and responsive side-by-side layouts out of the box.

Installation

Photoweb needs Python.

It's easiest with pipx:

pipx install photoweb

Usage

To generate the HTML for a gallery, call it from the command line:

photoweb .

You can generate multiple galleries at once:

photoweb beach hawaii snow

When you first generate a gallery, you can specify the page title and description, which will be used in the template:

photoweb -p "At the Beach" -d "We went to the beach for a weekend. Fun!" .

The page metadata will be saved in a file (md.json) for use next time you run photoweb.

Optimizing Images

You can optimize your original images in place and strip their metadata, which is recommended if you are going to host the files on a server:

photoweb -o .

By default, this uses a perceptual algorithm to find the best quality setting for each image. This can be slow; to optimize more quickly without perceptual search:

photoweb -o -f .

Optimization will also strip all metadata from the images for privacy and file size reduction.

Creating and Using Templates

By default, the bundled default template will be used. You can edit this, or create new templates, using them with the -t option:

photoweb -t "my template" .

To bootstrap your own template, you can copy the default one:

photoweb --copy-templates ./my-custom-design

Templates are directories with the following files in them:

  • md.json - a configuration file
  • gallery.html - the overview page
  • detail.html - a single photo page
  • style.css - visual styling
  • photoweb.js - interactive logic (for keyboard navigation and zoom)

Take a look at the default template to get an idea of how to create your own.

Navigation and Shortcuts

When viewing a photo in the generated gallery:

  • Left/Right Arrow keys: Previous/Next photo.
  • Escape: Return to the gallery index.
  • Click/Tap: Toggle between fit-to-screen and full-size view.

Release files for photoweb 0.5.6

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

Source distribution (sdist)

Source distribution for photoweb 0.5.6
File Size Uploaded
photoweb-0.5.6.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for photoweb 0.5.6
File Interpreter ABI Platform
photoweb-0.5.6-py3-none-any.whl Python 3 none any Details

Total release size: 34.8 kB

Release files / photoweb-0.5.6.tar.gz

Download URL photoweb-0.5.6.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9db35477fabaaf6b13a76936d033c29f00da96a6a28631a99683a9701b9e9e97
BLAKE2b-256 checksum
How to use checksums
ca48559e1a343a72520d5e2c610f3dbf7b87edf16de1d988d421502388755db8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / photoweb-0.5.6-py3-none-any.whl

Download URL photoweb-0.5.6-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
250ddad82fe088b342f269e57a665386bdb624d2a921d8010e0d53e4cc3de7a4
BLAKE2b-256 checksum
How to use checksums
78826a89dd982c45b64e974ef31b1eae033d66ff48c746ee2810146cd53d9fab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.6 This release

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

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