{"id":21206984,"url":"https://github.com/paralect/img-fly","last_synced_at":"2025-12-29T19:06:35.267Z","repository":{"id":140330556,"uuid":"127385285","full_name":"paralect/img-fly","owner":"paralect","description":"Docker based service for uploading and transforming images on the fly 🦋","archived":false,"fork":false,"pushed_at":"2018-05-03T16:36:48.000Z","size":1667,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-21T15:49:21.158Z","etag":null,"topics":["paralect-stack"],"latest_commit_sha":null,"homepage":null,"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/paralect.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2018-03-30T05:27:15.000Z","updated_at":"2018-05-03T16:36:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"955c90b7-3206-4a14-818b-d0696e7562b3","html_url":"https://github.com/paralect/img-fly","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fimg-fly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fimg-fly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fimg-fly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralect%2Fimg-fly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paralect","download_url":"https://codeload.github.com/paralect/img-fly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658808,"owners_count":20326566,"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":["paralect-stack"],"created_at":"2024-11-20T20:57:24.914Z","updated_at":"2025-12-29T19:06:30.235Z","avatar_url":"https://github.com/paralect.png","language":"JavaScript","readme":"# Img Fly\n[![Stack](https://raw.githubusercontent.com/paralect/stack/master/stack-component-template/stack.png)](https://github.com/paralect/stack)\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![Build Status](http://product-stack-ci.paralect.com/api/badges/paralect/img-fly/status.svg)](http://product-stack-ci.paralect.com/paralect/img-fly)\n[![David Dependancy Status](https://david-dm.org/paralect/img-fly.svg)](https://david-dm.org/paralect/img-fly)\n\n[![Watch on GitHub](https://img.shields.io/github/watchers/paralect/img-fly.svg?style=social\u0026label=Watch)](https://github.com/paralect/img-fly/watchers)\n[![Star on GitHub](https://img.shields.io/github/stars/paralect/img-fly.svg?style=social\u0026label=Stars)](https://github.com/paralect/img-fly/stargazers)\n[![Follow](https://img.shields.io/twitter/follow/paralect.svg?style=social\u0026label=Follow)](https://twitter.com/paralect)\n[![Tweet](https://img.shields.io/twitter/url/https/github.com/paralect/img-fly.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20Img%20Fly%20%F0%9F%A6%8B%20%E2%80%94%20an%20open-source,%20docker%20based%20service%20for%20uploading%20and%20manipulating%20images%20on%20a%20fly%20https://github.com/paralect/img-fly)\n\nDocker based service for uploading and transforming images on the fly 🦋. Based on native, ultra fast [Sharp](http://sharp.pixelplumbing.com/en/stable/performance/#the-task) and [Amazon S3](https://aws.amazon.com/s3/).\n\n## Features\n\n* 🔥️ **Transform images on the fly** Upload image and apply transformation by adding them to the url. Similar to [Cloudinary](https://cloudinary.com/).\n* 😍 **Resize, Crop, Face detection** and other image transformations. Based on [Sharp](http://sharp.pixelplumbing.com/en/stable/install/)\n* 🙀 **Amazon S3 as file storage** we store original uploads and all transformations over to your S3 bucket.\n* 🤗 **Upload directly from client app.** .\n* ️⚡️ **Easy to use** Img Fly is a Node.JS based microservice, shipped in Docker container.\n* 💰 **Automated S3 storage cleanup.** We cleanup your S3 bucket if file isn't accessed for over 30 days. ImgFly saves your money. *(planned)*\n* 👮‍♂️ **Secure** — we keep all uploads and file access secure by verifying `md5(resourceId,imgFlySecretKey)`. *(planned)*\n\n\n## Getting Started\n\n### Play around\n\n1. Clone this repo\n2. Create `.env` file with Amazon s3 credentials (see [.env.example](./.env.example)).\n3. Start a project using `./bin/start.sh`. \n4. Navigate to the `http://localhost:3002/` and upload image file.\n5. Click on the transformation link and play around with url params. \n\nExtract + Resize example:\n`http://localhost:3001/5ac0bb5fab7ce4028e879d03/extract-left_0,top_30,width_400,height_300+resize-width_300/nice_file_name.png`\n\n### Add ImgFly to your project\n\nImgFly shipped as [Docker container](https://hub.docker.com/r/paralect/img-fly/tags/). If you already using [docker-compose for your project](https://github.com/paralect/docker-compose-starter) it won't take more than 5 minutes to install and start using ImgFly. \n\nYou'll need to add following to your docker-compose file. [Full installation and usage guide](./INSTALL.md)\n```yml\nimg-fly:\n    image: paralect/img-fly:v0.2.2\n    ports:\n      - \"3003:3001\"\n    environment:\n      NODE_ENV: \"production\"\n      IMG_FLY_AWS_SECRET_KEY: \"YOUR AWS SECRET\"\n      IMG_FLY_AWS_ACCESS_KEY: \"YOUR AWS ACCESS KEY\"\n      IMG_FLY_AWS_S3_REGION: \"YOUR AWS REGION\"\n      IMG_FLY_AWS_S3_BUCKET: \"YOUR BUCKET NAME\"\n      IMG_FLY_MONGO_CONNECTION: \"mongodb://mongo:27017/img-fly-dev\"\n      IMG_FLY_MONGO_COLLECTION: \"img-fly_files\"\n      IMG_FLY_API_URL: \"http://localhost:3003\"\n      IMG_FLY_DEBUG: \"true\"\n```\n### Supported transformations\n\n1. [Extract](http://sharp.pixelplumbing.com/en/stable/api-operation/#extract)\n2. [Resize](http://sharp.pixelplumbing.com/en/stable/api-resize/#resize)\n    - [Crop](http://sharp.pixelplumbing.com/en/stable/api-resize/#crop)\n    - [Embed](http://sharp.pixelplumbing.com/en/stable/api-resize/#embed)\n    - [Max](http://sharp.pixelplumbing.com/en/stable/api-resize/#max)\n    - [withoutEnlargement](http://sharp.pixelplumbing.com/en/stable/api-resize/#withoutEnlargement)\n3. [Extract](http://sharp.pixelplumbing.com/en/stable/api-operation/#extract)\n4. [Blur](http://sharp.pixelplumbing.com/en/stable/api-operation/#blur)\n5. [toFormat](http://sharp.pixelplumbing.com/en/stable/api-output/#toformat)\n6. [Grayscale filter](http://sharp.pixelplumbing.com/en/stable/api-colour/#grayscale)\n\n[All transformations (code)](https://github.com/paralect/img-fly/tree/master/src/service/src/transformations)\n\nFeel free to submit PR's with more transformations. You'll need to implement a function which maps query params to the [sharp](http://sharp.pixelplumbing.com/) function params.\n\n#### Building transfomration query\nWe use following rules to form query params. \n1. `+` is used to combine multiple transformations.\n2. `-` is used as separator between transformation name and params.\n3. `_` is used to separate param name and param value;\n\nExample of applying extract \u0026 resize transformations: `extract-left_0,top_30,width_400,height_300+resize-width_300`\n\nExample of resize and crop: `resize-width_300,height_300+crop-strategy_attention`\n\n## Demo\n\nN/A\n\n## Change Log\n\nThis project adheres to [Semantic Versioning](http://semver.org/).\nEvery release is documented on the Github [Releases](https://github.com/paralect/img-fly/releases) page.\n\n## License\n\nShip is released under the [MIT License](LICENSE).\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n| [\u003cimg src=\"https://avatars2.githubusercontent.com/u/6461311?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEvgeny Zhivitsa\u003c/b\u003e\u003c/sub\u003e](https://github.com/ezhivitsa)\u003cbr /\u003e[💻](https://github.com/paralect/ship/commits?author=ezhivitsa \"Code\") [📖](https://github.com/paralect/ship/commits?author=ezhivitsa \"Documentation\") [🤔](#ideas-ezhivitsa \"Ideas, Planning, \u0026 Feedback\") [👀](#review-ezhivitsa \"Reviewed Pull Requests\") [⚠️](https://github.com/paralect/ship/commits?author=ezhivitsa \"Tests\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/2302873?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eIhar\u003c/b\u003e\u003c/sub\u003e](https://github.com/IharKrasnik)\u003cbr /\u003e[💻](https://github.com/paralect/ship/commits?author=IharKrasnik \"Code\") [📖](https://github.com/paralect/ship/commits?author=IharKrasnik \"Documentation\") [🤔](#ideas-IharKrasnik \"Ideas, Planning, \u0026 Feedback\") [👀](#review-IharKrasnik \"Reviewed Pull Requests\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/681396?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAndrew Orsich\u003c/b\u003e\u003c/sub\u003e](http://paralect.com)\u003cbr /\u003e[💻](https://github.com/paralect/ship/commits?author=anorsich \"Code\") [📖](https://github.com/paralect/ship/commits?author=anorsich \"Documentation\") [🤔](#ideas-anorsich \"Ideas, Planning, \u0026 Feedback\") |\n| :---: | :---: | :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparalect%2Fimg-fly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparalect%2Fimg-fly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparalect%2Fimg-fly/lists"}