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