Gathering detailed insights and metrics for qwik-image
Gathering detailed insights and metrics for qwik-image
Gathering detailed insights and metrics for qwik-image
Gathering detailed insights and metrics for qwik-image
npm install qwik-image
qwik-image-0.0.16
Published on 19 Nov 2024
qwik-image-0.0.15
Published on 19 Sept 2024
qwik-image-0.0.13
Published on 24 May 2024
qwik-image-0.0.10
Published on 23 Apr 2024
qwik-image-0.0.9
Published on 23 Apr 2024
qwik-image-0.0.8
Published on 30 Aug 2023
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
54 Stars
75 Commits
5 Forks
4 Watching
1 Branches
10 Contributors
Updated on 25 Nov 2024
TypeScript (81.58%)
CSS (9.07%)
JavaScript (8.87%)
Shell (0.48%)
Cumulative downloads
Total Downloads
Last day
-56%
55
Compared to previous day
Last week
-33.1%
406
Compared to previous week
Last month
-11.3%
2,112
Compared to previous month
Last year
68.9%
57,625
Compared to previous year
npm install qwik-image
or
yarn install qwik-image
or
pnpm install qwik-image
const imageTransformer$ = $(({ src, width, height }: ImageTransformerProps): string => {
return `${src}?w=${width}&h=${height}&format=webp`;
});
// Provide your default options
useImageProvider({
// you can set this property to overwrite default values [640, 960, 1280, 1920, 3840]
resolutions: [640],
// you we can define the source from which to load our image
imageTransformer$,
});
<Image
layout="fixed"
objectFit="cover"
width="300"
height="300"
src={...}
alt={...}
placeholder={...}
/>
Here is the loading values and behaviors https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
default: lazy
constrained
If the width of the image is larger than the screen, the screen size is taken, otherwise the actual image size is kept
fixed
regardless of the screen width, the width of the image is kept
fullWidth
the width of the image is always equal to the width of the screen
Here is the objectFit values and behaviors https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
default: cover
You can define a placeholder to wait for the image to load.
default: transparent
background: 'rgba(37,99,235,1)';
background: 'linear-gradient(180deg, rgba(2,0,36,1) 0%, rgba(166,206,247,1) 0%, rgba(37,99,235,1) 83%);';
background: 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNUTX59BgAEaQJBWyqr7QAAAABJRU5ErkJggg==")';
background: 'url("/public/placeholder.jpg") no-repeat center / cover';
No vulnerabilities found.
No security vulnerabilities found.