img-url-to-imgur

upload an image url to imgur

Usage no npm install needed!

<script type="module">
  import imgUrlToImgur from 'https://cdn.skypack.dev/img-url-to-imgur';
</script>

README

img-url-to-imgur

upload an image url to imgur

example

// using .then
const ImgurUpload = require('img-url-to-imgur');
const uploader = new ImgurUpload('your imgur client id here');

uploader.upload('image url').then(a => console.log(a));

// using async/await
const ImgurUpload = require('img-url-to-imgur');
const uploader = new ImgurUpload('your imgur client id here');
(async () => {
    const url = await uploader.upload('image url');
    console.log(url);
})();

NPM Page