Browse components

OptimizedImage

Image with explicit width and height that always loads lazily.

atoms

Live example

Default usage you can copy and adapt.

Basic Image

Simple optimized image

Vite Logo Svelte Logo

With Dimensions

Image with specific dimensions

Vite Logo Svelte Logo

Props

The props you are most likely to need, with types and defaults.

Props / API
NameTypeRequiredDefaultDescription
srcstringYes—Image source.
altstringNo—Alternative text.
widthnumber | stringNo100%Rendered width.
heightnumber | stringNoautoRendered height.