
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
vue-progressive-image
Advanced tools
Vue progressive image loading plugin
$ npm install vue-progressive-image
import Vue from 'vue'
import VueProgressiveImage from 'vue-progressive-image'
Vue.use(VueProgressiveImage)
In the template then, instead of using the normal img
tag to load images
<img src="https://unsplash.it/1920/1080" />
use the progressive-img
component already globally available after the plugin installation
<progressive-img src="https://unsplash.it/1920/1080" />
To be able to immediately show some feedback to the user, it is possible to pass a placeholder image, which should be really small, something arount 48x27px for example, depending on the aspect ratio of the main image.
The placeholder will be blurred and displayed almost instantly.
<progressive-img
src="https://unsplash.it/1920/1080?image=0"
placeholder="https://unsplash.it/48/27?image=0"
/>
It is possible to adjust the level of blur applied to the placeholder image
<progressive-img
src="https://unsplash.it/1920/1080?image=0"
placeholder="https://unsplash.it/48/27?image=0"
blur="30"
/>
During the installation process it is possible to pass some default global options
Vue.use(VueProgressiveImage, {
placeholder: 'https://unsplash.it/1920/1080?image=20'
})
Vue.use(VueProgressiveImage, {
blur: 30
})
This options is for debug only. It lets you have an easy look at the placeholder before the main image is fully loaded.
Vue.use(VueProgressiveImage, {
delay: 2000 // 2 seconds before the image is displayed
})
Global options like placeholder
and blur
will be applied only to components that don't specify their own options
Please drop an issue, if you find something that doesn't work, or a feature request at https://github.com/MatteoGabriele/vue-progressive-image/issues
Follow me on twitter @matteo_gabriele
FAQs
Vue progressive image loading plugin
The npm package vue-progressive-image receives a total of 1,027 weekly downloads. As such, vue-progressive-image popularity was classified as popular.
We found that vue-progressive-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.