imgproxykit¶
A typed Python toolkit for building imgproxy URLs.
Describe image transformations in Python and generate signed URLs for your imgproxy server. Reuse the same settings across product cards, avatars, and image previews.
Build your first URL¶
Install imgproxykit with Python 3.12 or newer:
uv add imgproxykit
poetry add imgproxykit
pip install imgproxykit
Create a client pointing to your imgproxy server and pass a source image URI:
Note
The examples use imgproxy.example.com for your imgproxy server and
originals.example.com for the original images. Replace these example
addresses with your own.
from imgproxykit import Client
# Public URL of your imgproxy server.
client = Client('https://imgproxy.example.com')
source_url = 'https://originals.example.com/photo.jpg'
imgproxy_url = client.url(source=source_url)
Continue with Getting started to resize images, choose an output format, and sign URLs.
Tip
URL generation makes no network requests. Your imgproxy server fetches and processes the image when the generated URL is requested. You need a running imgproxy server to serve images.
What you can do¶
Reuse transformations. Define a
Transformonce and use it for different source images.Configure processing in Python. Combine typed option classes and scalar keyword arguments for dimensions, formats, quality, and other settings.
Sign URLs. Use your server’s key and salt, or generate unsigned URLs when your server accepts them.
Reference server presets. Combine named imgproxy presets with explicit processing options.
Find your way¶
Getting started walks through installation and your first image URLs.
The user guide covers client configuration, transformations, and processing options.
API Reference lists classes, arguments, types, and extension points.
Version history tracks releases and compatibility changes.