Socket
Socket
Sign inDemoInstall

gulp-lqip-base64

Package Overview
Dependencies
117
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-lqip-base64

Parses HTML files to find `` tags and adds an attribute to them which contains their Base64 representation


Version published
Maintainers
1
Install size
24.6 MB
Created

Readme

Source

gulp-lqip-base64

Parses HTML files to find <img> tags and adds an attribute to them which contains their Base64 representation.

npm (scoped) JavaScript Style Guide Travis (.com) David License

Demo

https://exuanbo.github.io/gulp-lqip-base64/

Install

npm install --save-dev gulp-lqip-base64

Usage

const { task, src, dest } = require('gulp')
const lqipBase64 = require('gulp-lqip-base64')

task('default', () => {
  return src('**/*.html', { base: '.' })
    .pipe(lqipBase64({ attribute: 'srcset' }))
    .pipe(dest('.'))
})

or you can

import lqipBase64 from 'gulp-lqip-base64'

Supported image types

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

Options

Type: Object

srcAttr

  • Type: String
  • Default: src

Attribute which contain the image path.

attribute

  • Type: String
  • Default: data-src

Attribute which will contain the Base64 representation of the image.

Acknowledgement

Thanks gulp-image-lqip for the inspiration.

License

MIT

Donate

Buy Me A Coffee

Keywords

FAQs

Last updated on 30 Aug 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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