diff --git a/packages/astro/components/Picture.astro b/packages/astro/components/Picture.astro index 5ea2516d675e..00907f9d39af 100644 --- a/packages/astro/components/Picture.astro +++ b/packages/astro/components/Picture.astro @@ -48,8 +48,10 @@ if (fallbackImage.srcSet.values.length > 0) { { Object.entries(optimizedImages).map(([_, image]) => ( 0 ? ' , ' + image.srcSet.attribute : ''}`} - type={"image/" + image.options.format} + srcset={`${image.src}${ + image.srcSet.values.length > 0 ? ' , ' + image.srcSet.attribute : '' + }`} + type={'image/' + image.options.format} /> )) }