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

123

0.6.0

Diff

Changelog

Source

v0.6.0

  • Add linting (#7)
  • Breaking (maybe): Require node >= v4
herrstucki
published 0.5.3 •

Changelog

Source

v0.5.3

  • Fix wrong callback being called on file load error (#6)
herrstucki
published 0.5.2 •

Changelog

Source

v0.5.2

  • Added tests!
  • Update queue-async to d3-queue
herrstucki
published 0.5.1 •

Changelog

Source

v0.5.1

  • Optimization: skip resizing images of the same size (#5)
herrstucki
published 0.5.0 •

Changelog

Source

v0.5.0

Using the size option for getting only one resized image no longer just returns a string but the same object structure as when using sizes. The difference is, that when toString() is called on that object, it will return the path of the first resized image.

Also, for pure convenience, the returned object also contains a src property, so it can be spread onto a React component (e.g. <img {...resized} />).

Before

This worked:

import resized from 'responsive?sizes[]=100,sizes[]=200';

<img srcSet={resized.srcSet} src={resized.images[0].path} />
.foo { background-image: url('responsive?size=100'); }

But this didn't :sob::

import resized from 'responsive?size=100';

// Whoops, error because `resized` ist just a string
<img srcSet={resized.srcSet} src={resized.images[0].path} />
/* Whoops, `url('[object Object]')` */
.foo { background-image: url('responsive?sizes[]=100'); }

After

All these work :v:

import resized from 'responsive?sizes[]=100,sizes[]=200';

<img srcSet={resized.srcSet} src={resized.src} />
<img srcSet={resized.srcSet} src={resized} />
<img {...resized} />
.foo { background-image: url('responsive?sizes[]=100,sizes[]=200'); }
.foo { background-image: url('responsive?sizes[]=100'); }
.foo { background-image: url('responsive?size=100'); }
herrstucki
published 0.4.0 •

herrstucki
published 0.3.0 •

herrstucki
published 0.2.0 •

herrstucki
published 0.1.0 •

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