cloudex v0.1.3 Cloudex.Url

A module that helps creating urls to your cloudinary image, which can optionally transform the image as well.

Summary

Functions

Given a cloudinary public id string, this will generate an image url of where the image is hosted. You can also pass a map with options to apply transformations to the image, for more information see the documentation

Functions

for(public_id, options \\ %{})

Specs

Given a cloudinary public id string, this will generate an image url of where the image is hosted. You can also pass a map with options to apply transformations to the image, for more information see the documentation.

examples :

An url to the image at its original dimensions and no transformations

iex> Cloudex.Url.for("a_public_id")
"//res.cloudinary.com/my_cloud_name/image/upload/a_public_id"

An url to the image adjusted to a specific width and height

iex> Cloudex.Url.for("a_public_id", %{width: 400, height: 300})
"//res.cloudinary.com/my_cloud_name/image/upload/h_300,w_400/a_public_id"

An url to the image using multiple transformation options and a signature

iex> Cloudex.Url.for("a_public_id", %{crop: "fill", fetch_format: 'auto', flags: 'progressive', width: 300, height: 254, quality: "jpegmini", sign_url: true})
"//res.cloudinary.com/my_cloud_name/image/upload/s--jwB_Ds4w--/c_fill,f_auto,fl_progressive,h_254,q_jpegmini,w_300/a_public_id"