{"id":13693925,"url":"https://github.com/appunite/imager","last_synced_at":"2025-08-01T01:30:50.026Z","repository":{"id":49332507,"uuid":"151247543","full_name":"appunite/imager","owner":"appunite","description":"Image processing proxy","archived":false,"fork":false,"pushed_at":"2021-03-15T13:40:58.000Z","size":290,"stargazers_count":65,"open_issues_count":8,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-12T20:46:32.373Z","etag":null,"topics":["elixir","image-processing","imagemagick","imagemagick-wrapper","proxy","proxy-server"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/appunite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-02T12:03:05.000Z","updated_at":"2024-05-02T13:33:02.000Z","dependencies_parsed_at":"2022-09-05T21:41:31.099Z","dependency_job_id":null,"html_url":"https://github.com/appunite/imager","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fimager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fimager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fimager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2Fimager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appunite","download_url":"https://codeload.github.com/appunite/imager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228321226,"owners_count":17901604,"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":["elixir","image-processing","imagemagick","imagemagick-wrapper","proxy","proxy-server"],"created_at":"2024-08-02T17:01:20.546Z","updated_at":"2024-12-05T15:14:38.430Z","avatar_url":"https://github.com/appunite.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":[],"readme":"# Imager\n\n[![CircleCI](https://circleci.com/gh/appunite/imager.svg?style=svg)](https://circleci.com/gh/appunite/imager)\n[![Coverage Status](https://coveralls.io/repos/github/appunite/imager/badge.svg?branch=master)](https://coveralls.io/github/appunite/imager?branch=master)\n\nImage processing proxy server written in Elixir.\n\n## Why?\n\nWe needed to generate thumbnails for various files in one of our client's\nproduct.  We have tried to use SNS channel to produce them for new images only\nhowever this approach has few disadvantages:\n\n- you need to specify all needed image sizes upfront, so any change in needed\n  sizes requires redeployment of UI and image processing service\n- configuration of given application is quite complicated as it requires several\n  manual steps; this is especially troublesome in our situation as our\n  application need simple way to deploy by unskilled sysop on-premise\n\nWith given requirements we could use one of existing on-demand image processing\nservices like:\n\n- [Thumbor](https://github.com/thumbor/thumbor), quite popular service written\n  in Python which uses OpenCV bindings to process images\n- [Imaginary](https://github.com/h2non/imaginary), written in Go wrapper over\n  libvips library\n- [Imageflow](https://github.com/imazen/imageflow), written in Rust, AGPL\n  reimplementation of [ImageResizer](https://imageresizing.net)\n\nHowever we also needed support for PDFs and [DICOM][] images which is available\nonly in Imaginary.  However the API of the Imaginary do not provide enough\nflexibility, Imageflow/ImageResizer-like API is much easier to integrate with\nUI.  Imageflow would be a perfect solution (even despite AGPL license), however\nlack of PDF and DICOM support made it completely infeasible in our situation.\n\n## Production ready?\n\nNo.  We use it in our production release, but it is still prone to rapid changes\nin the API.  Current API is direct mapping to ImageMagick options, however in\nfuture releases we probably provide higher level API more similar to Imageflow\nwhich would allow us to provide support for different processing libraries, not\nonly ImageMagick.\n\n## Installation\n\n### Docker\n\nCurrently the only officially supported installation way is via official Docker\nimage that can be found on [Docker Hub][hub].\n\n1. First we need to generate configuration file for Imager\n\n  ```\n  $ docker run --rm appunite/imager:latest config \u003e config.toml\n  ```\n\n1. Edit `config.toml`.  Documentation is available within the file itself.\n1. Run container providing configuration.\n\n  ```\n  $ docker run --rm -v './config.toml:/etc/imager/config.toml:ro' -p 8080:80 appunite/imager:latest\n  ```\n\n## Usage\n\nAssuming that you have store named `local` and there is file named `lenna.png`\nyou can access this file directly via on \u003chttp://localhost:8080/local/lenna.png\u003e,\nto generate thumbnail of size `50x50` pixels you can then use\n\u003chttp://localhost:8080/local/lenna.png?thumbnail=50x50\u003e.\n\nCurrently available options are:\n\n- `thumbnail=\u003csize\u003e`\n- `strip`\n- `gravity=\u003cgravity\u003e`\n- `extent=\u003csize\u003e`\n- `flatten`\n- `background=\u003ccolour\u003e`\n- `format=\u003cformat\u003e`\n\nWhich maps 1:1 to their respective [ImageMagick flags][im-flags].\n\n## License\n\nSee [LICENSE](LICENSE) file.\n\n[im-flags]: https://imagemagick.org/script/command-line-processing.php#option\n[DICOM]: https://en.wikipedia.org/wiki/DICOM \"DICOM - Wikipedia\"\n[hub]: https://hub.docker.com/r/appunite/imager/ \"appunite/imager - Docker Hub\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappunite%2Fimager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappunite%2Fimager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappunite%2Fimager/lists"}