{"id":13447641,"url":"https://github.com/ahmadawais/resize-optimize-images","last_synced_at":"2025-04-15T01:09:01.961Z","repository":{"id":57354633,"uuid":"202497607","full_name":"ahmadawais/resize-optimize-images","owner":"ahmadawais","description":"🗃 Resize and optimize bmp, gif, jpeg, png, \u0026 tiff images in Node.js.","archived":false,"fork":false,"pushed_at":"2020-08-15T14:14:07.000Z","size":284,"stargazers_count":66,"open_issues_count":3,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T01:08:51.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ahmadawais.com/resize-optimize-images-javascript-node/","language":"JavaScript","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/ahmadawais.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T07:48:01.000Z","updated_at":"2024-12-03T12:24:55.000Z","dependencies_parsed_at":"2022-09-12T03:40:20.187Z","dependency_job_id":null,"html_url":"https://github.com/ahmadawais/resize-optimize-images","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadawais%2Fresize-optimize-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadawais%2Fresize-optimize-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadawais%2Fresize-optimize-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadawais%2Fresize-optimize-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadawais","download_url":"https://codeload.github.com/ahmadawais/resize-optimize-images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986313,"owners_count":21194025,"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":[],"created_at":"2024-07-31T05:01:23.212Z","updated_at":"2025-04-15T01:09:01.947Z","avatar_url":"https://github.com/ahmadawais.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# resize-optimize-images\n\n[![DOWNLOADS](https://img.shields.io/npm/dt/resize-optimize-images?label=DOWNLOADS%20%20❯\u0026colorA=6A788D\u0026colorB=6A788D\u0026style=flat)](https://www.npmjs.com/package/resize-optimize-images) [![Learn VSCode](https://img.shields.io/badge/-VSCODE.pro%20%E2%86%92-gray.svg?colorB=6A788D\u0026style=flat)](https://VSCode.pro/?utm_source=GitHubFOSS)\n[![Follow @MrAhmadAwais on Twitter](https://img.shields.io/badge/FOLLOW%20@MRAHMADAWAIS%20%E2%86%92-gray.svg?colorA=6A788D\u0026colorB=6A788D\u0026style=flat)](https://twitter.com/mrahmadawais/)\n\n\u003e 🗃 Resize and optimize bmp, gif, jpeg, png, \u0026amp; tiff images in Node.js.\n\n\u003cbr\u003e\n\n[![📟](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/install.png)](./../../)\n\n## Install\n\n```sh\nnpm install resize-optimize-images\n```\n\n\u003cbr\u003e\n\n[![⚙️](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/usage.png)](./../../)\n\n## Usage\n\n```js\nconst resizeOptimizeImages = require('resize-optimize-images');\n\n(async () =\u003e {\n\t// Set the options.\n\tconst options = {\n\t\timages: ['path/to/image.jpg', 'path/to/image.png'],\n\t\twidth: 1920,\n\t\tquality: 90\n\t};\n\n\t// Run the module.\n\tawait resizeOptimizeImages(options);\n})();\n```\n\n\u003cbr /\u003e\n\n[![📃](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/options.png)](./../../)\n\n## API\n\n### resizeOptimizeImages(options)\n\n#### ❯ options\n\nType: `object`\u003cbr\u003e\n\nYou can specify the options below.\n\n##### images\n\nType: `Array`\u003cbr\u003e\n\nArray of paths to images that you want to resize and optimize.\n\n##### width\n\nType: `Number`\u003cbr\u003e\nDefault: `1920`\n\nA number value of width e.g. 1920.\n\n##### height\n\nType: `Number`\u003cbr\u003e\n\nOptional number value of height e.g. 1080. If you don't pass a height then image is scaled accordingly with width to preserve the aspect ratio.\n\n##### quality\n\nType: `Number`\u003cbr\u003e\nDefault: `90`\n\nSet image quality. `100` being the best quality.\n\n\u003cbr\u003e\n\n[![📝](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/log.png)](changelog.md)\n\n## Changelog\n\n[❯ Read the changelog here →](changelog.md)\n\n\u003cbr\u003e\n\n\u003csmall\u003e**KEY**: `📦 NEW`, `👌 IMPROVE`, `🐛 FIX`, `📖 DOC`, `🚀 RELEASE`, and `✅ TEST`\n\n\u003e _I use [Emoji-log](https://github.com/ahmadawais/Emoji-Log), you should try it and simplify your git commits._\n\n\u003c/small\u003e\n\n\u003cbr\u003e\n\n[![📃](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/license.png)](./../../)\n\n## License \u0026 Conduct\n\n- MIT © [Ahmad Awais](https://twitter.com/MrAhmadAwais/)\n- [Code of Conduct](code-of-conduct.md)\n\n\u003cbr\u003e\n\n[![🙌](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/connect.png)](./../../)\n\n## Connect\n\n\u003cdiv align=\"left\"\u003e\n    \u003cp\u003e\u003ca href=\"https://github.com/ahmadawais\"\u003e\u003cimg alt=\"GitHub @AhmadAwais\" align=\"center\" src=\"https://img.shields.io/badge/GITHUB-gray.svg?colorB=6cc644\u0026colorA=6cc644\u0026style=flat\" /\u003e\u003c/a\u003e\u0026nbsp;\u003csmall\u003e\u003cstrong\u003e(follow)\u003c/strong\u003e To stay up to date on free \u0026 open-source software\u003c/small\u003e\u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"https://twitter.com/MrAhmadAwais/\"\u003e\u003cimg alt=\"Twitter @MrAhmadAwais\" align=\"center\" src=\"https://img.shields.io/badge/TWITTER-gray.svg?colorB=1da1f2\u0026colorA=1da1f2\u0026style=flat\" /\u003e\u003c/a\u003e\u0026nbsp;\u003csmall\u003e\u003cstrong\u003e(follow)\u003c/strong\u003e To get #OneDevMinute daily hot tips \u0026 trolls\u003c/small\u003e\u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"https://www.youtube.com/AhmadAwais\"\u003e\u003cimg alt=\"YouTube AhmadAwais\" align=\"center\" src=\"https://img.shields.io/badge/YOUTUBE-gray.svg?colorB=ff0000\u0026colorA=ff0000\u0026style=flat\" /\u003e\u003c/a\u003e\u0026nbsp;\u003csmall\u003e\u003cstrong\u003e(subscribe)\u003c/strong\u003e To tech talks \u0026 #OneDevMinute videos\u003c/small\u003e\u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"https://AhmadAwais.com/\"\u003e\u003cimg alt=\"Blog: AhmadAwais.com\" align=\"center\" src=\"https://img.shields.io/badge/MY%20BLOG-gray.svg?colorB=4D2AFF\u0026colorA=4D2AFF\u0026style=flat\" /\u003e\u003c/a\u003e\u0026nbsp;\u003csmall\u003e\u003cstrong\u003e(read)\u003c/strong\u003e In-depth \u0026 long form technical articles\u003c/small\u003e\u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"https://www.linkedin.com/in/MrAhmadAwais/\"\u003e\u003cimg alt=\"LinkedIn @MrAhmadAwais\" align=\"center\" src=\"https://img.shields.io/badge/LINKEDIN-gray.svg?colorB=0077b5\u0026colorA=0077b5\u0026style=flat\" /\u003e\u003c/a\u003e\u0026nbsp;\u003csmall\u003e\u003cstrong\u003e(connect)\u003c/strong\u003e On the LinkedIn profile y'all\u003c/small\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n[![👌](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/sponsor.png)](./../../)\n\n## Sponsor\n\nMe ([Ahmad Awais](https://twitter.com/mrahmadawais/)) and my incredible wife ([Maedah Batool](https://twitter.com/MaedahBatool/)) are two engineers who fell in love with open source and then with each other. You can read more [about me here](https://ahmadawais.com/about). If you or your company use any of my projects or like what I’m doing then consider backing me. I'm in this for the long run. An open-source developer advocate.\n\n- 🌟  **$9.99/month (recommended)** ❯ [Two cups of Caffè latte (coffee) every month →](https://pay.paddle.com/checkout/540217)\n- 🚀  **$99.99 (one-time sponsor)** ❯ [Support an hour of open-source code →](https://pay.paddle.com/checkout/515568)\n- 🔰  **$49.99 (one-time sponsor)** ❯ [Support an hour of maintenance →](https://pay.paddle.com/checkout/527253)\n- ☕️  **$9.99 (one-time sponsor)** ❯ [Lunch/coffee →](https://pay.paddle.com/checkout/527254)\n\n\u003cbr\u003e\n\nOr you can back me by checking out my super fun video course. As developers, we spend over 200 Hrs/month with our code editors — it's only fair to learn your next editor deeply. This course will save you 15-20 hours every month.  \u003ca href=\"https://vscode.pro/?utm_source=GitHubFOSS\" target=\"_blank\"\u003eBecome a VSCode Power User\u003c/a\u003e →\u003c/p\u003e\n\n\u003ca href=\"https://vscode.pro/?utm_source=GitHubFOSS\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ahmadawais/stuff/master/images/vscodepro/VSCode.jpeg\" /\u003e\u003cbr\u003e\u003cstrong\u003eVSCODE\u003c/strong\u003e\u003c/a\u003e\n\n\u003cbr\u003e\n\n[![VSCode](https://img.shields.io/badge/-VSCode.pro%20%E2%86%92-gray.svg?colorB=4D2AFF\u0026style=flat)](https://VSCode.pro/?utm_source=GitHubFOSS)\n[![Ahmad on Twitter](https://img.shields.io/twitter/follow/mrahmadawais.svg?style=social\u0026label=Follow%20@MrAhmadAwais)](https://twitter.com/mrahmadawais/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadawais%2Fresize-optimize-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadawais%2Fresize-optimize-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadawais%2Fresize-optimize-images/lists"}