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

html-srcset-loader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-srcset-loader

Automatically add srcset to images in html

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
55
increased by57.14%
Maintainers
1
Weekly downloads
 
Created
Source

html-srcset-loader

Automatically add srcset to images in html

installation

Requires image-resize-loader to create the resized images.

npm install --save-dev loader-utils jimp image-resize-loader html-srcset-loader

Usage

The html-srcset-loader will automatically transform any image in an html document to include an srcset with smaller versions of the image to lower bandwith usage on lower resulution screens.

loaders: [
    {
        test: /.*\.(png|jpg)(\?.+)?$/i,
        loaders: [
            'file',
            'image-resize'
        ]
    },
    {
        test: /\.html$/,
        loader: "html!html-srcset"
    },
    ...
]

FAQs

Package last updated on 30 Jul 2016

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