Skip to main content
Aero compresses images automatically as part of pnpm build. No extra configuration is required — the pipeline runs whenever you build for production. Under the hood, Aero uses vite-plugin-image-optimizer with sharp for raster images and svgo for SVGs.

Supported formats

How it works

Aero processes two sources of images:
  • Static directory — Images in your project’s static folders are collected automatically.
  • Imported images — Images imported inside <script is:build> blocks are hashed by Vite and then passed through the optimization pipeline.
Assets imported anywhere under client/assets/images (via the @images/ alias) are automatically collected as Rollup entry points, even if they are only used during server-side template generation.

Build output

During the build, the pipeline logs compression savings for every processed image:
Empty image files (0 bytes) are skipped with a warning rather than causing a hard build failure.