Astro
Astro assets
Also called astro:assets.
Astro assets is the built-in module, imported as astro:assets, that processes images you keep inside src. It gives them hashed filenames, resized variants, and known dimensions.
How it is measured
Files imported from src/assets are processed at build and written to dist/_astro/ with a content hash in the name. Files in public/ are copied as they are. Check which one a given image uses by looking at its URL in the built HTML.
Measure the effect in bytes. List the original file size, the output size for each width Astro created, and the width attribute in the final img tag. A hash in the name means you can cache the file for a year safely.
Worked example
A photographer's portfolio keeps 62 JPEGs in public/, averaging 4.1 MB each. The homepage grid loads 24 of them at once. After moving them to src/assets and rendering through the module, the grid pulls WebP files averaging 140 KB.
The next day the photographer replaces one image but keeps the filename. In public/ some visitors still see the old file for a week. In src/assets the hash changes and everyone gets the new one.
How it differs
Astro assets is the pipeline for files you own at build time. Astro Image is the component that uses that pipeline to output a tag. The pipeline decides format and hash; the component decides which width and attributes land in the page.
Common errors
Leaving large originals in public/ and assuming Astro will shrink them. Importing a remote URL without allowing its domain. Forgetting that CSS background images are not resized. Renaming folders and breaking import paths silently until build. Expecting the dev server to match production output exactly.
In practice
Move any image over 200 KB from public/ into src/assets. Keep favicons, robots.txt, and files that must keep a fixed URL in public/. Then compare the built page weight before and after.