Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

gatsby-remark-lazy-load

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

gatsby-remark-lazy-load

This plugin lazy loads image processed by gatsby-remark-images plugin

    1.0.2latest
    GitHub

Version published
Maintainers
1
Weekly downloads
491
decreased by-37.77%

Weekly downloads

Readme

Source

gatsby-remark-lazy-load

Lazyloads images processed by gatsby-remark-images with using lazysizes

The plugin makes lazyload possible by:

  • Move src and srcset to data-src and data-srcset respectively.
  • Add class lazyload to img tag.

lazysizes has to be installed to make this plugin work.

Install

npm install --save gatsby-remark-lazy-load

npm install --save lazysizes

How to use

// In your gatsby-config.js plugins: [ { resolve: `gatsby-transformer-remark`, options: { plugins: [ { resolve: `gatsby-remark-images`, }, `gatsby-remark-lazy-load`, ] } } ] // In your gatsby-browser.js import 'lazysizes'

Contribution

This is a minimum plugin. Please make an issue when you need more functionalities or code doesn't work!

Keywords

FAQs

Last updated on 21 Sep 2019

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc