{"id":21260728,"url":"https://github.com/erf/node-resize","last_synced_at":"2025-10-08T10:26:18.301Z","repository":{"id":69768569,"uuid":"399055232","full_name":"erf/node-resize","owner":"erf","description":"An image resize server built on node.js and sharp","archived":false,"fork":false,"pushed_at":"2023-05-30T21:18:39.000Z","size":500,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T02:55:34.236Z","etag":null,"topics":["image-resize","microservice","nodejs","resize"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-23T10:05:24.000Z","updated_at":"2023-05-24T21:05:58.000Z","dependencies_parsed_at":"2023-07-13T23:16:05.140Z","dependency_job_id":null,"html_url":"https://github.com/erf/node-resize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erf/node-resize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fnode-resize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fnode-resize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fnode-resize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fnode-resize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erf","download_url":"https://codeload.github.com/erf/node-resize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fnode-resize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278928615,"owners_count":26070393,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["image-resize","microservice","nodejs","resize"],"created_at":"2024-11-21T04:20:24.167Z","updated_at":"2025-10-08T10:26:18.294Z","avatar_url":"https://github.com/erf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-resize\n\nAn image resize server built using [Node.js](https://nodejs.org), [sharp](https://github.com/lovell/sharp), [AWS S3](https://aws.amazon.com/s3/) and [koa](https://koajs.com/)\n\n## How it works\n\n1. we receive `multipart/form-data` requests at `api/image`\n\n2. images are resized using `sharp` to a set of configured `sizes` \n\n3. images are uploaded to an `AWS S3` bucket using streams\n\n4. we return a `JSON` [response](#response) with URLS and sizes\n\n## Config\n\nWe use [node-config](https://github.com/lorenwest/node-config) to configure\n`AWS`, sizes and more.\n\n### Example\n\n```javascript\n{\n\tport: 1337,\n\tbucket: 'images',\n\ts3: {\n\t\tapiVersion: '',\n\t\tregion: '',\n\t\taccessKeyId: '',\n\t\tsecretAccessKey: ''\n\t},\n\tsizes: [[84, 84], [172, 172], [320, 320], [640, 640], [1024, 1024]],\n\tkeep_original: false,\n}\n```\n\n## Response\n\nThe response is an `JSON` array per image with links and sizes of all the resized\nimages.\n\n### Example\n\n```javascript\n[{\n\tid: \"fea4f480-7ce0-4143-a310-a03c2b2cdbc6\",\n\text: \"jpg\",\n\tfilename: \"fea4f480-7ce0-4143-a310-a03c2b2cdbc6.jpg\",\n\turl: \"http://s3-eu-west-1.amazonaws.com/my-images/0067505f-99db-4770-8fda-df70c8f879e0.jpg\"\n\tmain: true,\n\tscaled: [{\n\t\twidth: 640,\n\t\theight: 640,\n\t\turl: \"http://s3-eu-west-1.amazonaws.com/my-images/640x640_0067505f-99db-4770-8fda-df70c8f879e0.jpg\"\n\t}, {\n\t\twidth: 320,\n\t\theight: 320,\n\t\turl: \"http://s3-eu-west-1.amazonaws.com/my-images/320x320_0067505f-99db-4770-8fda-df70c8f879e0.jpg\"\n\t}, {\n\t\twidth: 172,\n\t\theight: 172,\n\t\turl: \"http://s3-eu-west-1.amazonaws.com/my-images/172x172_0067505f-99db-4770-8fda-df70c8f879e0.jpg\"\n\t}, {\n\t\twidth: 84,\n\t\theight: 84,\n\t\turl: \"http://s3-eu-west-1.amazonaws.com/my-images/84x84_0067505f-99db-4770-8fda-df70c8f879e0.jpg\"\n\t}],\n}]\n```\n\n## Test\n\nSee `test/README.md`\n\n## Contribute\n\nIf you have ideas on how to improve `node-resize`, please create an issue or a PR.\n\nLet's make the best (and fastest) image-resize server for Node.js !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Fnode-resize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferf%2Fnode-resize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Fnode-resize/lists"}