Installations
npm install vue-coe-image
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.19.0
NPM Version
8.6.0
Score
72.4
Supply Chain
98.4
Quality
75.8
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (72.68%)
Vue (17.05%)
HTML (6.56%)
CSS (3.71%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
viniazvd
Download Statistics
Total Downloads
8,675
Last Day
19
Last Week
54
Last Month
148
Last Year
1,567
GitHub Statistics
3 Stars
72 Commits
2 Watchers
7 Branches
1 Contributors
Updated on Jan 25, 2022
Bundle Size
2.42 kB
Minified
1.09 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.2.4
Package Id
vue-coe-image@0.2.4
Unpacked Size
17.94 kB
Size
4.50 kB
File Count
6
NPM Version
8.6.0
Node Version
14.19.0
Total Downloads
Cumulative downloads
Total Downloads
8,675
Last Day
850%
19
Compared to previous day
Last Week
170%
54
Compared to previous week
Last Month
108.5%
148
Compared to previous month
Last Year
-1.9%
1,567
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
6
vue-coe-image ✅
Component for progressive and lazy rendering images inspired by:
Intersection Observer API
✨ Example✨
Explanation https://developers.google.com/web/tools/lighthouse/audits/offscreen-images
Disclaimer
In the past, it was very difficult and expensive to detect the visibility of a particular element.
The Intersection Observer API solves this problem in a really organized, efficient and performative way. It provides a workable template that we can observe to be notified when an element enters the viewport.
Competitive Diferentials
- Loads image only when it enters the viewport (check in browser network)
- Progressive image loading with animations
- Performant progressive blur using SVG
- You receive intersection events to decide whether or not to perform tasks or animation processes based on whether the user will see the result or not.
Warning
The IntersectionObserver API is not fully supported by all modern browsers just yet, but there’s a polyfill for it maintained by the w3c.
Install
yarn add vue-coe-image
Include Plugin (to import globally)
1import Vue from 'vue' 2 3import 'vue-coe-image/dist/vue-coe-image.css' 4import { VueCoeImage } from 'vue-coe-image' 5 6Vue.use(VueCoeImage)
Register in component (to import locally)
1<script> 2import VueCoeImage from 'vue-coe-image' 3 4export default { 5 components: { VueCoeImage } 6 ... 7</script>
Pay Attention
You need to import the style file so the animations will work!
I recommend doing this on a global level.
1import 'vue-coe-image/dist/vue-coe-image.css'
Use
1<template> 2 <div> 3 <vue-coe-image 4 :src="src" 5 fallback="https://i.ytimg.com/vi/Yt9t9e9gmmw/maxresdefault.jpg" 6 /> 7 <button @click="changeImage">coe</button> 8 </div> 9</template> 10 11<script> 12import VueCoeImage from 'vue-coe-image' 13 14export default { 15 components: { VueCoeImage }, 16 17 data () { 18 return { 19 src: 'https://3.bp.blogspot.com/-PRG407gZ9bE/V0TCSHFQKcI/AAAAAAAADjE/KbkLmxIXcjMcx4hKTFnDSQxcdPqGuNNWwCLcB/s1600/flamengologo.png' 20 } 21 }, 22 23 methods: { 24 changeImage () { 25 this.src = 'https://www.urbanarts.com.br/imagens/produtos/065033/Detalhes/urubu-do-mengao.jpg' 26 } 27 } 28} 29</script>
A Note on Performance
Observe the elements occupy memory and CPU!
For this reason, immediately after finding the element, we use an instance method named disconnect to stop observing and make the lib more performative.
Props
Name | type | required | About |
---|---|---|---|
loaderImage | String | false | shows while the image is not loaded (has a default) |
src | String | true | Image to load when crossing viewport |
srcset | String | false | Images to be used for different resolutions |
fallback | String | false | Also known as a 'placeholder', this prop avoids an error if it fails or delays loading the image. |
animation | Bollean | false | Animation handler (default is true) |
intersectionOptions | Object | false | options by mdn |
delay | String | false | Delay to show image |
blurLevel | Number | false | Blur animation |
duration | Number | false | Animation duration time |
Events
Name | About |
---|---|
intersect | Triggered when the image crosses the viewport for more complex animations and state manipulation |
error | Triggered when an image upload error occurs |

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
46 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr
- Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-h9rv-jmmf-4pgx
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-mv48-hcvh-8jj8
- Warn: Project is vulnerable to: GHSA-353f-5xf4-qw67
- Warn: Project is vulnerable to: GHSA-c24v-8rfc-w8vw
- Warn: Project is vulnerable to: GHSA-8jhw-289h-jh2g
- Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
- Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6
- Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
Score
1.3
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More