Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-image-lqip

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-image-lqip

Gulp plugin which generates HTML image placeholders using lqip technique

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by75%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-image-lqip

npm version Build Status dependencies Status devDependency Status

Parses your HTML files to find images and adds a data-src attribute to them which contains their Base64 representation.

Demo

Install

npm install --save-dev gulp-image-lqip

Usage

const gulp = require('gulp');
const gulpImgLqip = require('gulp-image-lqip');

gulp.task('default', () => {
  return gulp.src('*.html')
    // `gulp-image-lqip` needs filepaths
    // so you can't have any plugins before it
    .pipe(gulpImgLqip(__dirname))
})

Supported files

Currently ['jpeg', 'jpg', 'png', 'gif'] files are supported.

API

gulpImgLqip(rootPath, options)

rootPath
  • Type: string
  • Required

Define the rootPath of your website, it must be an absolute path.

options

Type: Object

attribute
  • Type: string
  • Default: data-src

Attribute which will contain the Base64 representation of your image.

pretty
  • Type: Boolean
  • Default: true

Use pretty to beautify the HTML files.

srcAttr
  • Type: string
  • Default: src

Attribute which contain your image.

Support me

If you want to thank me or support my work:

Thanks

Thanks lqip for the inspiration :+1:

License

MIT © Johann-S

Keywords

FAQs

Package last updated on 18 Sep 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc