![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
nuxt-lazy-load
Advanced tools
npm i nuxt-lazy-load
You don't need to bother with extra attributes on elements (like data-src and data-srcset), just add the module in nuxt.config.js and that's it
⚠️ For Nuxt 2, use nuxt-lazy-load < 3.0.0
// nuxt.config.js (nuxt.config.ts)
modules: [
'nuxt-lazy-load'
]
modules: [
'nuxt-lazy-load'
],
lazyLoad: {
// These are the default values
images: true,
videos: true,
audios: true,
iframes: true,
native: false,
directiveOnly: false,
// Default image must be in the public folder
defaultImage: '/images/default-image.jpg',
// To remove class set value to false
loadingClass: 'isLoading',
loadedClass: 'isLoaded',
appendClass: 'lazyLoad',
observerConfig: {
// See IntersectionObserver documentation
}
}
If you don't want to use lazy load on every image/video/audio/iframe, set directiveOnly to true and use directive like this (with data-src/data-srcset/data-poster)
<img data-src="image.png" alt="" title="" v-lazy-load>
You don't need to add directive (v-lazy-load) on source elements
<video data-poster="~/assets/images/poster.jpg" v-lazy-load>
<source data-src="video.mp4" type="video/mp4"> --> without directive
</video>
If you don't want to lazy load single element, just add data-not-lazy attribute
<audio controls="controls" data-not-lazy>
<source type="audio/mpeg" src="audio.mp3">
</audio>
FAQs
Nuxt 3 Lazy Load
We found that nuxt-lazy-load 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.