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

responsive-loader

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

responsive-loader - npm Package Versions

124

1.2.0-beta.1

Diff

herrstucki
published 1.1.0 •

Changelog

Source

v1.1.0

  • Added min and max options to automatically generate a number of images, and steps option to say how many images (#31).
herrstucki
published 1.0.0 •

Changelog

Source

v1.0.0

New

Breaking

Webpack 2 support

Removed support for webpack 1! Please upgrade to webpack >= 2.

The syntax to import images has changed. The query part now comes after the resource (the image) instead of the loader.

- require('responsive-loader?size=100!some-image.jpg')
+ require('responsive-loader!some-image.jpg?size=100')

That means if responsive-loader is configured in your webpack-config, it's possible to specify image-specific options without having to add the loader part to the import path. For example:

// webpack.config.js
module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /\.jpg$/,
        loader: 'responsive-loader',
        options: {
          size: 1000
          //...
        }
      }
    ]
  },
}

// some-file.js
const image1000 = require('some-image.jpg') // will have size 1000 from the config
const image500 = require('some-image.jpg?size=500')
Other breaking changes
  • The ext option was removed, in favor of format=jpg|png. [ext] is now part of the name option like in other loaders (fixes #13)
  • Changed default JPEG quality to 85
  • The pass option is now called disable
herrstucki
published 1.0.0-rc.2 •

herrstucki
published 1.0.0-rc.1 •

herrstucki
published 0.8.0-alpha.1 •

herrstucki
published 0.7.0 •

Changelog

Source

v0.7.0

  • Add placeholder option (#16)
  • Add width and height attributes to output (#19)
herrstucki
published 0.6.1 •

Changelog

Source

v0.6.1

  • Declare default name, context, quality, and background through webpack options when they're not specified in the loader query (#12).
herrstucki
published 0.6.1-beta.4 •

herrstucki
published 0.6.1-beta.3 •

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