diff --git a/.changeset/young-taxis-battle.md b/.changeset/young-taxis-battle.md new file mode 100644 index 000000000..66d0ad1d4 --- /dev/null +++ b/.changeset/young-taxis-battle.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix an issue where HTML attributes do not render if getHTMLAttributes in an image service returns a Promise \ No newline at end of file diff --git a/packages/astro/src/assets/internal.ts b/packages/astro/src/assets/internal.ts index 9cb48f588..310b746a8 100644 --- a/packages/astro/src/assets/internal.ts +++ b/packages/astro/src/assets/internal.ts @@ -111,7 +111,7 @@ export async function getImage( src: imageURL, attributes: service.getHTMLAttributes !== undefined - ? service.getHTMLAttributes(validatedOptions, imageConfig) + ? await service.getHTMLAttributes(validatedOptions, imageConfig) : {}, }; }