{"id":29129025,"url":"https://github.com/nico-martin/node-image-processing","last_synced_at":"2026-04-12T16:04:47.157Z","repository":{"id":37173328,"uuid":"276484172","full_name":"nico-martin/node-image-processing","owner":"nico-martin","description":"A nodeJS library that manipulates images on the fly.","archived":false,"fork":false,"pushed_at":"2022-06-25T13:56:48.000Z","size":1638,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-20T21:10:41.956Z","etag":null,"topics":["image-manipulation","image-processing","nodejs"],"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/nico-martin.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":"2020-07-01T21:20:15.000Z","updated_at":"2024-03-20T21:10:41.957Z","dependencies_parsed_at":"2022-06-24T05:09:11.172Z","dependency_job_id":null,"html_url":"https://github.com/nico-martin/node-image-processing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nico-martin/node-image-processing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-martin%2Fnode-image-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-martin%2Fnode-image-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-martin%2Fnode-image-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-martin%2Fnode-image-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nico-martin","download_url":"https://codeload.github.com/nico-martin/node-image-processing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-martin%2Fnode-image-processing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262700271,"owners_count":23350445,"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":["image-manipulation","image-processing","nodejs"],"created_at":"2025-06-30T02:37:52.954Z","updated_at":"2026-04-12T16:04:47.115Z","avatar_url":"https://github.com/nico-martin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Image Processing (Beta)\n\nA nodeJS library that manipulates images on the fly.\n\nYou can think of it as an image proxy that also manipulates images based on parameters added to the URL.\n\nLet's take this image:\n```\nhttps://mysite.com/path/to/image.jpg\n```\nHere we have `https://mysite.com` as the image host and `/path/to/image.jpg` as the path to the image.  \nNow we have this tool running on `https://img.mysite.com`, we can just proxy the image:\n```\nhttps://img.mysite.com/path/to/image.jpg\n```\nor we can also crop and resize it to 500x500px and grayscale it:\n```\nhttps://img.mysite.com/size-500x500/transform[grayscale]/path/to/image.jpg\n```\n\nThe image will be generated on the frst request, then it's cached and will be served from the cache directly from the second request on.\n\n## Config\nThe config is mainly based on ENV Vars:\n- `PORT`: The port where the server should run\n- `IMAGES_FOLDER`: The folder where images should be cached\n- `IMG_HOST`: The origin host of the image\n\n## Size\nImages can be resized and cropped. Therefore it exepts an URL parameter prefixed with `size-`:\n```\n/size-{width}x{height}/\n/size-500x500/\n/size-500x0/ \n/size-0x500/\n```\nYou can set 0 for width or height. That means it will keep the ratio and only chage what's specified.\n\n## Transform\nImages can be transformed with a second URL parameter prefixed with `transform`.\n```\n/transform[{function},{value: optional}]/\n/transform[blur,20][grayscale]/\n```\n\n### Available transformations\n#### flip\nFlip the image horizontally or vertically:\n```\n[flip,v] flip vertically\n[flip,h] flip horizontally\n[flip,vh] flip vertically and horizontally\n```\n#### rotate\nRotates the image clockwise by a number of degrees.\n```\n[rotate,{0 - 365}]\n```\n#### brightness\nadjust the brighness\n```\n[brightness,{-100 - 100}]\n```\n#### contrast\nadjust the contrast\n```\n[contrast,{-100 - 100}]\n```\n#### dither565\nordered dithering of the image and reduce color space to 16-bits (RGB565)\n```\n[dither565]\n```\n#### grayscale\nremove colour from the image\n```\n[grayscale]\n```\n#### invert\ninvert the image colours\n```\n[invert]\n```   \n#### gaussian\nGaussian blur the image by r pixels\n```\n[gaussian,{r}]\n```\n#### blur\nfast blur the image by r pixels\n```\n[blur,{r}]\n```     \n#### quality\nchange the quality of the image\n```\n[quality,{0 - 100}]\n```  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnico-martin%2Fnode-image-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnico-martin%2Fnode-image-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnico-martin%2Fnode-image-processing/lists"}