#What's up with @astrojs/image 0.16.1?

1 messages · Page 1 of 1 (latest)

pure pumice
#
import { Picture } from "@astrojs/image/components";
<Picture
      src={HeroImage}
      width={600}
      alt="Wrath of Man"
      widths={[480, 600]}
      formats={["webp"]}
      quality={50}
      fit="inside"
      aspectRatio="16:9"
    />
#

Renders as:

<picture>
    <source type="image/webp" srcset="/_astro/section-hero.d46f06e0_Z1xk8sR.webp 480w,/_astro/section-hero.d46f06e0_d0e7O.webp 600w"><source type="image/jpeg" srcset="/_astro/section-hero.d46f06e0_Z1XsHSq.jpeg 480w,/_astro/section-hero.d46f06e0_Zd8lhJ.jpeg 600w">
    <img alt="Wrath of Man" fit="inside" src="/_astro/section-hero.d46f06e0_Zd8lhJ.jpeg" loading="lazy" decoding="async" width="600" quality="50">
</picture>
#

Sorry, fit does work. I didn't expect it to be passed to the final render.