1.0.0 • Published 5 years ago

vanilla-image-loader v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Vanilla image loader

This is a simple images loader utility.

Any pull request for optimisations and new additions is more than welcome.

Installing vanilla-image-loader

npm install vanilla-image-loader
    or
yarn add vanilla-image-loader

Usage

import loadImage from 'vanilla-image-loader';

loadImage('path/to/image')
    .then(({ width, height }) => {
        console.log(width, height);
    })
    .catch((error) => {
        console.log(error);
    };