{"id":20038148,"url":"https://github.com/imager-io/imager-io-js","last_synced_at":"2025-07-26T12:03:22.305Z","repository":{"id":36463604,"uuid":"225484594","full_name":"imager-io/imager-io-js","owner":"imager-io","description":"Imager for JavaScript (NodeJS) - Site performance tools for efficiently distributing media on the web.","archived":false,"fork":false,"pushed_at":"2023-01-05T02:12:19.000Z","size":3101,"stargazers_count":16,"open_issues_count":20,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T18:51:24.768Z","etag":null,"topics":["compression","image","image-compression","image-optimization","javascript","nodejs","page-speed","typescript","web-performance"],"latest_commit_sha":null,"homepage":"https://imager.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imager-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"colbyn"}},"created_at":"2019-12-02T22:55:06.000Z","updated_at":"2024-05-17T01:28:28.000Z","dependencies_parsed_at":"2023-01-17T01:42:18.771Z","dependency_job_id":null,"html_url":"https://github.com/imager-io/imager-io-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imager-io%2Fimager-io-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imager-io%2Fimager-io-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imager-io%2Fimager-io-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imager-io%2Fimager-io-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imager-io","download_url":"https://codeload.github.com/imager-io/imager-io-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252451633,"owners_count":21749961,"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":["compression","image","image-compression","image-optimization","javascript","nodejs","page-speed","typescript","web-performance"],"created_at":"2024-11-13T10:26:05.000Z","updated_at":"2025-05-05T06:32:04.904Z","avatar_url":"https://github.com/imager-io.png","language":"Rust","funding_links":["https://patreon.com/colbyn"],"categories":[],"sub_categories":[],"readme":"# Imager \u003csmall\u003e\u003cem\u003efor JavaScript\u003c/em\u003e\u003c/small\u003e\n\n* [Source](https://github.com/imager-io/imager-io-js)\n* [NPM](https://www.npmjs.com/package/imager-io)\n* [Example](https://git.io/Jeo6e)\n* [Documentation](https://github.com/imager-io/imager-io-js/blob/master/docs/imager-nodejs.md)\n\n## Features\n\n### Brute Force Image Optimization\n\n\u003e Optimizes the compression using ML based metrics in a trial ’n error sorta manner.\n\nThis is a tool that can competitively optimize (e.g.) extremely noisy, high resolution images; at the expense of increased encoding time and CPU overhead. This is a tradeoff that should be suitable for over 90% of online content, where site performance matters.\n\nIt's pretty easy too.\n\n```shell\n$ npm install --save imager-io\n```\n\n\u003csmall\u003eUsing the JavaScript non-blocking API:\u003c/small\u003e\n\n```javascript\nconst {ImageBuffer} = require(\"imager-io\");\nImageBuffer\n\t.open(\"source-image.jpeg\")\n\t.then(buffer =\u003e buffer.opt())\n\t.then(buffer =\u003e buffer.save(\"result.jpeg\"))\n\t.then(() =\u003e console.log(\"done\"));\n```\n\n\n## [Compression Benchmarks](https://github.com/colbyn/imager-bench-2019-11-2)\n\n```text\nsource        : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 39.00M (4 images)\nkraken.io     : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 24M\njpegmini.com  : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 16M\ncompression.ai: ▇▇▇▇▇▇▇▇ 8.90M\nimager        : ▇▇▇▇ 4.20M\n```\n\n### Supported **Input** Image Formats\n\n| Format | Decoding |\n| ------ | -------- |\n| PNG    | All supported color types |\n| JPEG   | Baseline and progressive |\n| GIF    | Yes |\n| BMP    | Yes |\n| ICO    | Yes |\n| TIFF   | Baseline(no fax support) + LZW + PackBits |\n| WebP   | Lossy(Luma channel only) |\n| PNM    | PBM, PGM, PPM, standard PAM |\n\nEssentially supports any image decodable by [image-rs](https://github.com/image-rs/image.git).\n\n### Supported **Output** Image Formats\n\n\u003e These are your optimization targets (for lack of a better name). It’s a bit higher level, since e.g. rate control is automatically handled.\n\n| Format | Encoding |\n| ------ | -------- |\n| JPEG   | progressive |\n\n### Supported Operating Systems\n\n| OS     | Current Status |\n| ------ | -------- |\n| Linux   | ✅ [GOOD] |\n| MacOS   | ✅ [GOOD] |\n| Windows   | ❌ [UNPRIORITIZED] (Use WSL) |\n\n#### Webpack\n\nIt’s possible and pretty easy to use Webpack and Imager already, [here is an example](https://github.com/imager-io/webpack-imager-example-vanilla).\n\n## Feedback, Requests, Bugs, Confusion \u0026 Performance Issues\nJust use the GitHub issue tracker for this project.\n\n## Other Miscellaneous\n\n### Self Contained\nOur npm releases contain prebuilt native node libraries (i.e. the *rust* code). With eventual plans for WASM support.\n\n### Articles\n\n* [Modern Image Optimization for 2020 - Issues, Solutions, and Open Source Solutions](https://medium.com/@colbyn/modern-image-optimization-for-2020-issues-solutions-and-open-source-solutions-543af00e3e51)\n\n\n\u003chr/\u003e\n\nCopyright 2019 Colbyn Wadman","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimager-io%2Fimager-io-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimager-io%2Fimager-io-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimager-io%2Fimager-io-js/lists"}