Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@techassi/vue-lazy-image
Advanced tools
This plugin lets you lazy load images making use of IntersectionObserver
This plugin lets you lazy load images making use of IntersectionObserver. This plugin is Vue V3 compatible.
npm install @techassi/vue-lazy-image --save
or
yarn add @techassi/vue-lazy-image
main.js
import { createApp } from 'vue';
import App from './App.vue';
import VueLazyImage from '@techassi/vue-lazy-image';
createApp(App).use(VueLazyImage).mount('#app');
YourComponent.vue
<template>
<lazy-image :src="PATH_TO_IMAGE" :id="UNIQUE_ID"></lazy-image>
</template>
main.js
import { createApp } from 'vue';
import App from './App.vue';
import VueLazyImage from '@techassi/vue-lazy-image';
const intersectionObserverOptions = {};
createApp(App).use(VueLazyImage, intersectionObserverOptions).mount('#app');
YourComponent.vue
<template>
<lazy-image
:src="PATH_TO_IMAGE"
:id="UNIQUE_ID"
:use-picture="TRUE / FALSE"
@EVENT="CALLBACK"
></lazy-image>
</template>
For detailed Intersection observer options see here
@intersected
: This event triggers when the image intersects with the viewport@loaded
: This event triggers when the image is loaded@error
: This event triggers when there was an error loading the imageContributions and pull request are welcome!
cd vue-lazy-image
yarn install / npm install
yarn run build / npm run build
FAQs
This plugin lets you lazy load images making use of IntersectionObserver
The npm package @techassi/vue-lazy-image receives a total of 5 weekly downloads. As such, @techassi/vue-lazy-image popularity was classified as not popular.
We found that @techassi/vue-lazy-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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.