thumbor_client v0.4.1 ThumborClient
Documentation for ThumborClient.
Link to this section Summary
Functions
Method to get the Thumbor Client This methods is a HOF to return the client of Thumbor
Thumbor requires an specific encryption to work. The encryption is a HMAC-SHA1 using the secret key setted in thumbor server and the path. After encrypt with HMAC-SHA1, must be encrypted with Base64 url_encode
Method to generate image passing parameters
Link to this section Functions
Method to get the Thumbor Client This methods is a HOF to return the client of Thumbor
Examples
iex> client = ThumborClient.client(“123”) iex> client.(%{image: “image.jpg”, width: 500, height: 400, smart: true}) “rFZk5DrMK2hKAwVMJU4O4ZYDpeI=/500x400/smart/image.jpg”
Thumbor requires an specific encryption to work. The encryption is a HMAC-SHA1 using the secret key setted in thumbor server and the path. After encrypt with HMAC-SHA1, must be encrypted with Base64 url_encode.
Examples
iex> ThumborClient.encrypt_to_thumbor(“123”, “500/500/image.jpg”) “VMKhXMULBn4h1UC52W3YliEgFfg=”
Method to generate image passing parameters
Examples
iex> ThumborClient.generate(%{width: 200, height: 200, image: “my-image.jpg”}, “123”) “gliOovhxLB8RGXinV2YT_W607lw=/200x200/my-image.jpg”
OR
iex> ThumborClient.generate(%{width: 200, height: 200, image: “my-image.jpg”}) “unsafe/200x200/my-image.jpg”