this is the @magic-modules Picture component.
wraps <picture>
to load modern image formats with fallbacks to jpg|png|gif.
npm install --save-exact @magic-modules/picture
<Picture name="image" ext="jpg"></Picture>
below is the javascript usage with the default arguments
export const View = () => {
Picture({
name: 'image', // required!
ext: 'jpg',
avif: true,
})
}
first release.
- update dependencies
- lazy is a boolean now.
- swc will now correctly prefill WEB_ROOT for img src and source srcset
...