npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

blitline-resizer

v0.2.3

Published

Resizes images using Blitline

Readme

Build Status

Blitline Image Resizer

Resizes images using Blitline. Takes an array of image urls and an array of sizes and will copy all resized images to an Amazon S3 bucket. Right now sizes are for fit to width. Images need to be online and publicly accessible.

Why?

Created for resizing images for use on responsive websites, hence for now only fits width.

Usage

  1. Create a Blitline account and get a valid Application Id (a developer account is free).

  2. Set up permissions on an Amazon S3 bucket so that Blitline can put the results there.

  3. If you submit a postbackUrl you will need a server that can receive and process the postback (think webhook) that Blitline posts to when image processing is complete.

If you set options.postbackUrl then resize() will return an array of hashes with job_id according to https://www.blitline.com/docs/api#returnData - one job for each image you submit.

If you do not set options.postbackUrl then it should return an array of results for each image as described http://www.blitline.com/docs/postback - this is not guaranteed though, the request can timeout. Using a postbackUrl is more reliable.

var config = {
    blitlineAppId: 'YOUR_BLITLINE_APP_ID',
    postbackUrl: 'http://valid.url/to/receive/postback',
    s3Bucket: 'AMAZON_S3_BUCKET_NAME'
}

var resize = require('blitline-resizer')(config);

var options = {
    images: [ 'array', 'of', 'valid', 'image', 'urls'],
    sizes: [ 100, 200 ] // array of widths to resize to
}

resize(options, function(err, response) {
    console.log(response);
    // responds with a hash or results with job_ids see https://www.blitline.com/docs/api
}

Tests

Needs the following environment variables set:

BLITLINE_APP_ID=_your blitline app id_
S3_KEY=_s3 key ID for test user_
S3_SECRET=_s3 secret key for test user_
S3_BUCKET=_test s3 bucket_ # NB. Blitline should have PutObject permissions, your S3 test user should have DeleteObject permissions

npm test

Todo

  • [x] Better test coverage
  • [x] Support polling to avoid needing postback server
  • [ ] Allow resizing to fit both height and width

Changelog

v0.2.1

Can set secret on initial config, rather than each task

v0.2.0

Support for long polling without a postback

v0.1.0

Add options.retina to also create retina versions of images. Defaults to false. NB. Breaking change previously it created retina versions by default.