New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-webp-html-nosvg

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-webp-html-nosvg

Replaces the tag with <source> in HTML files. No SVG, GIF format and data- support

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
153
decreased by-39.76%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-webp-html-nosvg

This is a modified version of the plugin gulp-webp-html. Here was fixed thebug that added two dots before webp to the final html file. No SVG format.

Example

// Input
<img src="/images/catalogImage.jpg">

// Output
<picture>
    <source srcset="/images/catalogImage.webp" type="image/webp">
    <img src="/images/catalogImage.jpg">
</picture>


// Input
<img src="/images/catalogImage.jpg" srcset="/images/catalogImage2x.jpg 2x">

// Output
<picture>
    <source srcset="/images/catalogImage.webp, /images/catalogImage2x.webp 2x" type="image/webp">
    <img src="/images/catalogImage.jpg" srcset="/images/catalogImage2x.jpg 2x">
</picture>

// Input
<img src="/images/catalogImage.svg">

// Output
<img src="/images/catalogImage.svg">

Install

npm i --save-dev gulp-webp-html-nosvg

Usage

let webphtml = require('gulp-webp-html-nosvg');

gulp.task('html',function(){
    gulp.src('./assets/**/*.html')
        .pipe(webphtml())
        .pipe(gulp.dest('./public/'))
});

Keywords

FAQs

Package last updated on 01 Jun 2022

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