{"id":27399643,"url":"https://github.com/techroot777/image-batch-download","last_synced_at":"2025-04-14T03:20:14.255Z","repository":{"id":45194190,"uuid":"441807704","full_name":"techroot777/image-batch-download","owner":"techroot777","description":"A simple package for single or batch image download and conversion using node streams.","archived":false,"fork":false,"pushed_at":"2022-01-23T22:48:30.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-08T22:33:51.493Z","etag":null,"topics":["batch","download","download-manager","downloader","image","image-processing","png","typescript","webp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techroot777.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-26T04:19:39.000Z","updated_at":"2022-01-02T00:33:57.000Z","dependencies_parsed_at":"2022-09-02T08:24:00.848Z","dependency_job_id":null,"html_url":"https://github.com/techroot777/image-batch-download","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techroot777%2Fimage-batch-download","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techroot777%2Fimage-batch-download/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techroot777%2Fimage-batch-download/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techroot777%2Fimage-batch-download/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techroot777","download_url":"https://codeload.github.com/techroot777/image-batch-download/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813989,"owners_count":21165656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch","download","download-manager","downloader","image","image-processing","png","typescript","webp"],"created_at":"2025-04-14T03:20:13.710Z","updated_at":"2025-04-14T03:20:14.234Z","avatar_url":"https://github.com/techroot777.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# image-batch-download\n[![npm version](https://badge.fury.io/js/image-batch-downloader.svg)](https://badge.fury.io/js/image-batch-downloader)\n\nA simple package for basic image downloading and processing.\n\nSupported formats:\n- JPEG\n- PNG\n- WebP\n\n## Installation\n\nWith Yarn:\n```bash\nyarn add image-batch-downloader\n```\n\nOr with NPM:\n```bash\nnpm install image-batch-downloader\n```\n\n## How to use\n\n### Single download\nThe code below will download the 150 pixel image, convert it to WebP at 75% of the original quality, and resize it to 100 size.\n```ts\nconst downloader = getDownloader();\nconst imageSettings: ImageSettings = {\n    imageUrl: 'https://via.placeholder.com/150',\n    toFormat: ImageFormat.Webp,\n    quality: 75,\n    outputPath: './output/my-output-image.webp',\n    size: 100\n};\nawait downloader.download(imageSettings);\n```\n\n### Batch download\nScenario similar to the previous one but with PNG format and limit of 10 simultaneous downloads.\n```ts\nconst downloader = getDownloader();\nconst urls = [\n  'https://path-to-image-1.jpeg',\n  'https://path-to-image-2.png',\n  'https://path-to-image-3.webp'\n];\nconst format = ImageFormat.Png;\nconst settings: ImageSettings[] = urls.map((url, index) =\u003e ({\n    imageUrl: url,\n    toFormat: format,\n    quality: 75,\n    outputPath: `./output/image-${index}.${format}`,\n    size: 100\n}));\ndownloader.batchDownload(settings, 10).subscrible();\n```\n\n## When to use?\n- For web scraping of image-rich sites\n- To download hundreds or thousands of remote images without the server identifying the numerous requests as an attack\n- To process many images asynchronously and consuming minimal resources\n\n## Why this package?\n- Use of streams\n- Use of observables to emit the progress of batch downloads\n- Asynchronous code usage\n- Simple and easy to use API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechroot777%2Fimage-batch-download","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechroot777%2Fimage-batch-download","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechroot777%2Fimage-batch-download/lists"}