Open sourceActive

Astro Imports

Astro's built-in static asset and module import system.

Open source page ↗

Product features

Product features

alt (required)

densities

format

<Image />

Image and Assets API Reference

import.meta.glob()

Glob-based import helper referenced in the imports reference.

Imports from astro:assets

inferSize

JSON import

Imported JSON files return the full JSON object via the default export.

NPM package import

Import installed NPM packages; legacy formats are converted to ESM.

Files in public/

Static assets in public/ are copied directly into the final build untouched.

quality

sizes

src (required)

Supported file types

Astro components, Markdown, JS, TS, JSON, CSS, CSS Modules, images and assets.

width and height (required for images in public/ )

widths