{"id":13563612,"url":"https://github.com/globocom/thumbor-client-ex","last_synced_at":"2025-09-08T09:44:47.481Z","repository":{"id":66161298,"uuid":"132259380","full_name":"globocom/thumbor-client-ex","owner":"globocom","description":"Client to thumbor using Elixir","archived":false,"fork":false,"pushed_at":"2019-01-09T13:02:59.000Z","size":22,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-06T08:36:39.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/globocom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2018-05-05T15:17:48.000Z","updated_at":"2019-06-28T09:56:42.000Z","dependencies_parsed_at":"2023-05-02T16:31:20.486Z","dependency_job_id":null,"html_url":"https://github.com/globocom/thumbor-client-ex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/thumbor-client-ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fthumbor-client-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fthumbor-client-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fthumbor-client-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fthumbor-client-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/thumbor-client-ex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fthumbor-client-ex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166945,"owners_count":25233959,"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-09-08T02:00:09.813Z","response_time":121,"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":[],"created_at":"2024-08-01T13:01:21.365Z","updated_at":"2025-09-08T09:44:47.451Z","avatar_url":"https://github.com/globocom.png","language":"Elixir","funding_links":[],"categories":["Images"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/globocom/thumbor-client-ex.svg?branch=master)](https://travis-ci.org/globocom/thumbor-client-ex) [![HitCount](http://hits.dwyl.io/globocom/thumbor-client-ex.svg)](http://hits.dwyl.io/globocom/thumbor-client-ex)\n\n# ThumborClient\n\nThis package is a client to generate URLs to [Thumbor](https://github.com/thumbor/thumbor) using Elixir language.\n\n## Installation\n\nThe package can be installed by adding `thumbor_client` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:thumbor_client, \"~\u003e 0.4.0\"}\n  ]\nend\n```\n\n## Usage\n\n### In safe mode\n\n```elixir\niex\u003e client = ThumborClient.client(\"my_secret_token\")\niex\u003e client.(%{image: \"path/to/image.jpg\", width: 500, height: 500})\n\"1_6x25QaeExcQVmtuNyrr_lOs-0=/500/500/path/to/image.jpg\"\n```\n\n### In unsafe mode\n\n```elixir\niex\u003e client = ThumborClient.client()\niex\u003e client.(\"%{image: \"path/to/image.jpg\", width: 500, height: 500})\n\"unsafe/500/500/path/to/image.jpg\"\n```\n\n### Another way to generate\n\nThe method `client(\"key\")` is recommended if you will generate multiple images in same function.\nIf you prefer, you can call the method generate without this HOF.\n\n```elixir\niex\u003e ThumborClient.generate(%{image: \"image.jpg\", width: 500, height: 500}, \"my_secret_token\")\n# The last parameter is optional, if not exist should use unsafe mode\n```\n\n## Options\n\n|      Option       | Default Value |                                                                                               Description                                                                                               |\n|-------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| trim: (bool)      | false         | Removes surrounding space in image using top-left pixel color unless specified otherwise                                                                                                               |\n| meta: (bool)      | false         | Instead of get the image, get all meta data informations in image returning using json                                                                                                                  |\n| fit: (atom\\|nil)   | nil           | The fit argument specifies that the image should not be auto-cropped and auto-resized to be EXACTLY the specified size. Possible values: :fit_in, :adaptive_fit_in, :full_fit_in, :adaptive_full_fit_in |\n| width: (integer)  | 0             | Final width of image                                                                                                                                                                                    |\n| height: (integer) | 0             | Final height of image                                                                                                                                                                                   |\n| flip: (bool)      | false         | Flip image horizontaly                                                                                                                                                                                  |\n| flop: (bool)      | false         | Flip image verticaly                                                                                                                                                                                    |\n| halign: (atom)    | :center       | Orientation to crop horizontaly. Possible values: `:left`, `:center`, `:right`                                                                                                                                |\n| valign: (atom)    | :center       | Orientation to crop verticaly. Possible values: `:top`, `:center`, `:bottom`                                                                                                                                  |\n| smart: (bool)     | false         | Use Thumbor algorithms to crop using facial recognition process                                                                                                                                         |\n| filters: (list)   | []            | Adding filters to image. More details bellow                                                                                                                                                            |\n| image: (string)   | nil           | Path of image. Can be external.                                                                                                                                                                         |\n\n## Filters\n\nYou can see a big list of filters in official [Thumbor documentation](https://github.com/thumbor/thumbor/wiki/Filters). You must set a list of strings with values.\n\nExamples of usage:\n\n#### Brightness\n\n```elixir\nThumborClient.generate(%{filters: [\"brightness(40)\"], width: 400, height: 300, path: \"/path/image.jpg\"})\n```\n#### Blur\n\n```elixir\nThumborClient.generate(%{filters: [\"blur(40)\"], width: 400, height: 300, path: \"/path/image.jpg\"})\n```\n\n#### Grayscale\n\n```elixir\nThumborClient.generate(%{filters: [\"grayscale()\"], width: 400, height: 300, path: \"/path/image.jpg\"})\n```\n\n#### Multiple filters\n\n```elixir\nThumborClient.generate(%{filters: [\"grayscale()\", \"rotate(90)\", \"saturate(20)\"], width: 400, height: 300, path: \"/path/image.jpg\"})\n```\n\n## Docs\n\nThe docs can be found at [https://hexdocs.pm/thumbor_client](https://hexdocs.pm/thumbor_client).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fthumbor-client-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fthumbor-client-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fthumbor-client-ex/lists"}