All Projects → demsking → image-downloader

demsking / image-downloader

Licence: MIT License
A Nodejs module for downloading image to disk from a given URL

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to image-downloader

anghamify
Anghami Downloader | Download Anghami songs with full meta-tags.
Stars: ✭ 22 (-63.93%)
Mutual labels:  downloader, download
angular-downloader
Angular Downloader is an angularjs directive that enables you to manage browser download - https://720kb.github.io/angular-downloader
Stars: ✭ 16 (-73.77%)
Mutual labels:  downloader, download
ngDownloader
📹 🎥 Now Download videos from any website including YouTube, Facebook, Udemy etc without ads.
Stars: ✭ 47 (-22.95%)
Mutual labels:  downloader, download
bookmate downloader
Download books as epub from bookmate.com
Stars: ✭ 38 (-37.7%)
Mutual labels:  downloader, download
ee.Yrewind
Can rewind and save YouTube live stream
Stars: ✭ 133 (+118.03%)
Mutual labels:  downloader, download
qobuz-dl
A complete Lossless and Hi-Res music downloader for Qobuz
Stars: ✭ 531 (+770.49%)
Mutual labels:  downloader, download
lux
👾 Fast and simple video download library and CLI tool written in Go
Stars: ✭ 19,266 (+31483.61%)
Mutual labels:  downloader, download
fansly
Simply scrape / download all the media from an fansly account
Stars: ✭ 351 (+475.41%)
Mutual labels:  downloader, download
Vividl
Modern Windows GUI for youtube-dl/ yt-dlp
Stars: ✭ 189 (+209.84%)
Mutual labels:  downloader, download
mmdl
MMDL (Mega Music Downloader) - A tool to easily download music.
Stars: ✭ 29 (-52.46%)
Mutual labels:  downloader, download
vsco-scraper
Easily allows for scraping a VSCO
Stars: ✭ 106 (+73.77%)
Mutual labels:  downloader, download
Port-Able-Suite
🌐 Manager for portable applications
Stars: ✭ 35 (-42.62%)
Mutual labels:  downloader, download
download
Dateidownloads von Files aus dem Medienpool über PHP oder X-SendFile
Stars: ✭ 30 (-50.82%)
Mutual labels:  downloader, download
EFDownloader
DEPRECATED
Stars: ✭ 11 (-81.97%)
Mutual labels:  downloader, download
Floatplane-Downloader
Project for automatically organizing and downloading Floatplane videos for plex.
Stars: ✭ 94 (+54.1%)
Mutual labels:  downloader, download
node-wetransfert
Download wetransfert content with nodeJS
Stars: ✭ 16 (-73.77%)
Mutual labels:  downloader, download
canvas-record
A one trick pony package to record and download a video from a canvas animation.
Stars: ✭ 64 (+4.92%)
Mutual labels:  downloader, download
fbdl
📥 Download publicly shared videos from Facebook with an ease!
Stars: ✭ 29 (-52.46%)
Mutual labels:  downloader, download
downloader
Async rate-limited downloading service
Stars: ✭ 18 (-70.49%)
Mutual labels:  downloader, download
acd
ACD helps you download Adobe Connect Sessions Videos and Audios, download files from FTP server, transfer files using Shift I/O
Stars: ✭ 117 (+91.8%)
Mutual labels:  downloader, download

Node Image Downloader

A Node module for downloading image to disk from a given URL

npm Build status Test coverage Buy me a beer

Install

npm install --save image-downloader

Options

  • url (required) - the image URL to download
  • dest (required) - the image destination. Can be a directory or a filename. If a directory is given, ID will automatically extract the image filename from options.url (see usage bellow)
  • extractFilename - boolean indicating whether the image filename will be automatically extracted from options.url or not. Set to false to have options.dest without a file extension for example. (default: true)
  • headers - HTTP headers (default: {})
  • timeout - milliseconds before a request times out

For advanced options, see Node.js http.request()'s options documentation

Syntax

declare module download {
  image(options: Options): Promise<{ filename: string }>;
}

Usage

Download to a directory and save with the original filename

const download = require('image-downloader')

const options = {
  url: 'http://someurl.com/image.jpg',
  dest: '/path/to/dest'                // will be saved to /path/to/dest/image.jpg
}

download.image(options)
  .then(({ filename }) => {
    console.log('Saved to', filename)  // saved to /path/to/dest/image.jpg
  })
  .catch((err) => console.error(err))

Download to a directory and save with an another filename

const download = require('image-downloader')

options = {
  url: 'http://someurl.com/image2.jpg',
  dest: '/path/to/dest/photo.jpg'      // will be saved to /path/to/dest/photo.jpg
}

download.image(options)
  .then(({ filename }) => {
    console.log('Saved to', filename)  // saved to /path/to/dest/photo.jpg
  })
  .catch((err) => console.error(err))

Download with another filename without extension

const download = require('image-downloader')

options = {
  url: 'http://someurl.com/image3.jpg',
  dest: '/path/to/dest/photo',         // will be saved to /path/to/dest/photo
  extractFilename: false
}

download.image(options)
  .then(({ filename }) => {
    console.log('Saved to', filename)  // saved to /path/to/dest/photo
  })
  .catch((err) => console.error(err))

License

Under the MIT license. See LICENSE file for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].