Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-trains-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Add loading behavior option to ImageSharedProps type
15 changes: 14 additions & 1 deletion packages/astro/src/assets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,25 @@ type ImageSharedProps<T> = 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;
}
Expand Down
Loading