bim

Image Processing

bim automatically processes images for optimal web delivery.

Source Directory

Place images in the images/ directory:

images/
  photo.jpg
  diagrams/
    architecture.png
  screenshots/
    app.webp

Processing Steps

  1. Load the image
  2. Strip EXIF metadata (privacy)
  3. Resize to maximum dimensions
  4. Re-encode with target quality

Default Settings

SettingDefault
Max width1920px
Max height1080px
JPEG quality85%

Supported Formats

Raster images that get processed:

SVG and Vector Images

SVG files are not processed through the image pipeline (they're already optimized vectors). Place them in static/images/ instead:

static/
  images/
    logo.svg
    diagrams/
      architecture.svg

They'll be copied to /images/ in output, same as processed images.

Using Images

Reference images in Markdown:

![Architecture diagram](/images/diagrams/architecture.svg)

Images are served from /images/... in output.

Example Images

Here are some images from this site:

Logo

bim Logo

Architecture Diagram

bim Architecture

Backlinks Visualization

How Backlinks Work

Standalone Processing

Process images without a full build:

bim prep-images
bim prep-images --force  # Reprocess all

Caching

Unchanged images are skipped during rebuild. Use --force to reprocess everything.

Related: #images #optimization @documentation