0.2.1 • Published 7 years ago

broccoli-image-resize v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Broccoli Image Resize

A plugin to resize images as part of a Broccoli build. This plugin uses sharp to do the image resizing.

Usage

The following example (when run on an input of test.png) will produce test.png at a width of 640 with auto height, and a test-th.png at exactly 100 width and 100 height (cropped).

var BroccoliImageResize = require('broccoli-image-resize');

var outputNode = new BroccoliImageResize(inputNodes, {
  sizes: {
    default: [640],
    th: [100, 100]
  }
});

Options

OptionDescription
sizesThe arguments to sharp's resize function as an array
withoutEnlargementIf set to a truthy value, then the image will never be enlarged
annotationAn annotation for the Broccoli plugin output
0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago