{"id":13753770,"url":"https://github.com/elixirlabs/imgout","last_synced_at":"2026-02-05T23:34:20.960Z","repository":{"id":143650984,"uuid":"67560455","full_name":"elixirlabs/imgout","owner":"elixirlabs","description":"On the fly thumbnail generator microservice using Elixir/OTP. (with Heroku Deploy Button)","archived":false,"fork":false,"pushed_at":"2019-04-27T23:44:09.000Z","size":321,"stargazers_count":60,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T06:30:45.543Z","etag":null,"topics":["elixir","graphicsmagick","heroku","imagemagick","microservice","thumbnails"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":false,"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/elixirlabs.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}},"created_at":"2016-09-07T01:27:26.000Z","updated_at":"2023-11-27T13:17:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b34c0f3-ad28-41db-92b3-bc05118c4c32","html_url":"https://github.com/elixirlabs/imgout","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/elixirlabs%2Fimgout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixirlabs%2Fimgout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixirlabs%2Fimgout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixirlabs%2Fimgout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixirlabs","download_url":"https://codeload.github.com/elixirlabs/imgout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253329009,"owners_count":21891562,"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","graphicsmagick","heroku","imagemagick","microservice","thumbnails"],"created_at":"2024-08-03T09:01:29.089Z","updated_at":"2026-02-05T23:34:20.945Z","avatar_url":"https://github.com/elixirlabs.png","language":"Elixir","funding_links":[],"categories":["imagemagick"],"sub_categories":[],"readme":"# ImgOut [Sample Project for Meetup Talk]\n\nOn the fly thumbnail generator microservice using Elixir/OTP and exmagick.\n\n# Usage\n\nInstall graphicsmagick, memcached and fetch the repo:\n\n```shell\nbrew install graphicsmagick # necessary for exmagick\nbrew install memcached # necessary for caching\ngit clone git@github.com:elixirlabs/imgout.git\ncd imgout\n```\n\nConfigure memcache and remote storage url on `config/dev.exs`:\n\n```elixir\nconfig :memcache_client,\n  host: \"127.0.0.1\",\n  port: 11211,\n  auth_method: :none,\n  username: \"\",\n  password: \"\",\n  pool_size: 50,\n  pool_max_overflow: 0\n\nconfig :imgout,\n  acceptors: 50,\n  gm_pool_size: 25,\n  gm_pool_max_overflow: 0,\n  gm_timeout: 5000,\n  cache_pool_size: 50,\n  cache_pool_max_overflow: 0,\n  remote_storage_url: \"http://localhost:4000/images\",\n  remote_storage_pool_size: 50,\n  remote_storage_pool_max_overflow: 0\n```\n\nFetch dependencies and run the server:\n\n```shell\nmix deps.get\niex -S mix\n```\n\nFor using local images put some images under `public/images` path and keep remote storage url as is.\n\nOpen your browser add visit the url:\n\n```\n\nhttp://localhost:4000/thumb/{{image_name}}/{{width}}x{{height}}\n\nimage_name: name of the image under your `public/images` folder or remote file name\nwidth: integer\nheight: integer\n```\n\nOn production, you need to change remote storage url to source of original images. ImgOut will request to fetch original image to \"{{remote_storage_url}} + / + {{image_name}}\"\" from source.\n\n# Deploy to Heroku\n\nYou can use default config while deploying heroku. For test purposes change REMOTE_STORAGE_URL to \"http://{{your_app_name}}.herokuapp.com/images\" then visit http://{{your_app_name}}.herokuapp.com/thumb/{{image_name}}/{{width}}x{{height}}\n\nThere is a sample image under public/images folder with the name '0B58FWWTQqRCMek4zUWhCU0J3QUU' so you can visit:\n\nhttp://{{your_app_name}}.herokuapp.com/thumb/0B58FWWTQqRCMek4zUWhCU0J3QUU/128x128\n\n[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\n## Experiments\n\nImgOut has 2 other experimental branches, take a look and deploy them to heroku to see which branch is the most performant and why. Each branch has its own 'Heroku Deploy' button, so do not hesitate to deploy and see with your eyes. If you have time also read my blog post, I tried to explain all of them(https://medium.com/elixirlabs/re-design-with-elixir-otp-and-pattern-matching-b452213c7947)\n\n## Performance\n\nImgOut processed more than 3k thumbs in a minute on Heroku free dyno.\n\n*Metrics:* http://bit.ly/2bYRnpp\n\n*Live Service metrics endpoint:* /metrics/thumb\n\n### On Heroku Free Dyno\n\nData collected with deprecated `metrex` package for 60 seconds visualization on 0-100 active clients using loader.io\n\n```js\n{\n  \"meters\": {\n    \"succeed\": {\n      \"1476055126\": 60,\n      \"1476055123\": 73,\n      \"1476055164\": 63,\n      \"1476055133\": 53,\n      \"1476055155\": 62,\n      \"1476055121\": 57,\n      \"1476055129\": 62,\n      \"1476055157\": 55,\n      \"1476055179\": 26,\n      \"1476055136\": 59,\n      \"1476055118\": 31,\n      \"1476055159\": 64,\n      \"1476055160\": 56,\n      \"1476055171\": 48,\n      \"1476055147\": 68,\n      \"1476055175\": 56,\n      \"1476055158\": 52,\n      \"1476055156\": 61,\n      \"1476055174\": 65,\n      \"1476055148\": 43,\n      \"1476055127\": 60,\n      \"1476055163\": 58,\n      \"1476055161\": 56,\n      \"1476055177\": 65,\n      \"1476055170\": 54,\n      \"1476055119\": 50,\n      \"1476055124\": 68,\n      \"1476055125\": 60,\n      \"1476055122\": 61,\n      \"1476055165\": 54,\n      \"1476055140\": 59,\n      \"1476055149\": 75,\n      \"1476055135\": 31,\n      \"1476055131\": 45,\n      \"1476055168\": 40,\n      \"1476055167\": 68,\n      \"1476055146\": 65,\n      \"1476055166\": 55,\n      \"1476055130\": 50,\n      \"1476055151\": 62,\n      \"1476055134\": 36,\n      \"1476055178\": 62,\n      \"1476055154\": 70,\n      \"1476055172\": 59,\n      \"1476055143\": 68,\n      \"1476055152\": 71,\n      \"1476055138\": 63,\n      \"1476055169\": 60,\n      \"1476055142\": 58,\n      \"1476055139\": 50,\n      \"1476055150\": 58,\n      \"1476055128\": 59,\n      \"1476055132\": 49,\n      \"1476055144\": 53,\n      \"1476055153\": 62,\n      \"1476055145\": 54,\n      \"1476055137\": 34,\n      \"1476055120\": 52,\n      \"1476055141\": 68,\n      \"1476055162\": 61,\n      \"1476055173\": 54,\n      \"1476055176\": 69\n    },\n    \"failed\": {\n\n    }\n  },\n  \"counters\": {\n    \"total\": 3520,\n    \"succeed\": 3520,\n    \"failed\": 0,\n    \"active\": 0\n  }\n}\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixirlabs%2Fimgout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixirlabs%2Fimgout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixirlabs%2Fimgout/lists"}