Nitro Ecosystem

Nitro Image

Fast, friendly image processing for Python web apps and SaaS. Chainable API, responsive image generation, and smart presets.

$ pip install nitro-image

Features

Chainable API

Queue operations and execute lazily. Build complex pipelines with clean, readable code.

Resize and crop

Multiple strategies including resize, thumbnail, cover, contain, and smart crop.

Format conversion

Convert between WebP, PNG, JPEG, and AVIF with automatic format selection.

Adjustments and effects

Brightness, contrast, sharpen, blur, grayscale, sepia, and rounded corners.

Watermark and text

Add logos and text overlays with positioning and opacity control.

Responsive images

Generate multiple sizes for responsive design in a single operation.

Placeholders

Generate LQIP, dominant color, BlurHash, and SVG placeholders for fast loading.

Built-in presets

Common presets for thumbnails, avatars, OG images, and banners ready to use.

Batch processing

Process multiple images at once with parallel execution support.

Quick example

from nitro_image import NitroImage

# Chainable API with lazy execution
image = (
    NitroImage.open("photo.jpg")
    .resize(800, 600)
    .sharpen()
    .to_webp(quality=85)
    .save("output.webp")
)

# Generate responsive sizes
NitroImage.open("hero.jpg").responsive(
    widths=[320, 640, 1024, 1920],
    formats=["webp", "avif"],
    output_dir="build/images/"
)

# Use presets
NitroImage.open("avatar.jpg").preset("avatar").save("avatar.webp")
NitroImage.open("post.jpg").preset("og_image").save("og.png")

Get started with Nitro Image.

$ pip install nitro-image