diff --git a/.changeset/lazy-trains-switch.md b/.changeset/lazy-trains-switch.md new file mode 100644 index 000000000000..841763754dff --- /dev/null +++ b/.changeset/lazy-trains-switch.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Add loading behavior option to ImageSharedProps type diff --git a/packages/astro/src/assets/types.ts b/packages/astro/src/assets/types.ts index ca1216e71f5c..22837919fee4 100644 --- a/packages/astro/src/assets/types.ts +++ b/packages/astro/src/assets/types.ts @@ -210,12 +210,25 @@ type ImageSharedProps = T & { * ``` */ priority?: boolean; - + /** + * Loading behavior for the image, e.g., "lazy" or "eager". + */ + loading?: string; /** * A list of widths to generate images for. The value of this property will be used to assign the `srcset` property on the final `img` element. * * This attribute is incompatible with `densities`. */ + title?: string; + /** + * Class name for the image element. This will be passed to the `class` attribute of the final `img` element. + */ + class?: string; + /** + * A list of widths to generate images for. The value of this property will be used to assign the `srcset` property on the final `img` element. + * + * This attribute is incompatible with `densities`. + */ widths?: number[]; densities?: never; }