FastImage finds the size or type of an image given its URL by fetching as little as needed.

Code Quality Rank: L4
Programming language: TypeScript
License: ISC License
Tags: Image Processing     SVG     Height     Fast     Image     Image Discovery     Web Crawling     Image Size     webp     tiff     psd     gif     bmp     jpeg     png     width     resolution     dimensions     size     fastimage    
Latest version: v2.0.1

fastimage alternatives and similar libraries

Based on the "Image Processing" category.
Alternatively, view fastimage alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of fastimage or a related project?

Add another 'Image Processing' Library



Package Version Dependency Status Build Status Coverage Status

FastImage finds the size or type of an image given its URL by fetching as little as needed.


The supported image type are (thanks to the image-size module):

  • BMP
  • GIF
  • JPEG
  • PNG
  • PSD
  • TIFF
  • WebP
  • SVG

Supported implementations.

FastImage supports and has been tested on NodeJS 5.0+.


For more details usage examples, see the examples folder.

Callback style

To get the image informations, call fastimage.info passing the URL (can be also a local file path or a Buffer) and a callback.

var fastimage = require("fastimage");
fastimage.info("http://placehold.it/100x100", function(error, information){
    // ...
    // ...

For the details about the second parameter of the callback, see fastimage.info, fastimage.size and fastimage.type.

Promise style

All the fastime image methods info, filteredInfo, size and type return a Promise. Once resolved, the promises have the same payload of the callbacks.

var fastimage = require("fastimage");

    // ...
    // ...

Stream style

If you want to go The Node.js Way, you can use the streaming API.

Calling fastimage.stream it will return a Duplex stream object. Called without arguments, it's ideal for piping. Otherwise, you can use only it's readable side.

// Duplex

// Readable

Streams will emit the size and type if you only need those informations.

API Documentation

The API documentation can be found here.

Contributing to fastimage

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.


Copyright (C) 2015 and above Shogun ([email protected]).

Licensed under the MIT license, which can be found at https://choosealicense.com/licenses/mit.

*Note that all licence references and agreements mentioned in the fastimage README section above are relevant to that project's source code only.