
Optimized Images
T Richardson
May 5, 2025
92 words
Less than 1 minute
Optimized images supported through Astro Image. An Astro Image will process an image in your src/assets
folder, and output an optimized image with a srcset
and sizes
.
This template also demonstrates how to set uploads
paths on a per-input level, to allow for both processed and unprocessed images on one site. On this template, by default, image inputs are opened at public/images
, meaning they are unprocessed images.
Components that use the Astro Image component are configured so the image source input opens at src/assets/images
, which are images to be processed and optimized on build.