rsim v0.1.0 Rsim.ImageFetcher View Source

Link to this section Summary

Functions

Returns image url for provided Rsim.Image ID {:ok, image_url} = Rsim.ImageFetcher.get_image_url(“2f8e8e23-ee58-47bb-9610-6881652a1f34”)

Returns image url for provided Rsim.Image ID and specified width and height

Link to this section Functions

Link to this function get_image_url(image) View Source
get_image_url(Rsim.Image.t()) :: {:ok, String.t()} | {:error, String.t()}
get_image_url(String.t()) :: {:ok, String.t()} | {:error, String.t()}

Returns image url for provided Rsim.Image ID {:ok, image_url} = Rsim.ImageFetcher.get_image_url(“2f8e8e23-ee58-47bb-9610-6881652a1f34”)

Link to this function get_image_url(image_id, width, height) View Source
get_image_url(String.t(), number(), number()) ::
  {:ok, String.t()} | {:error, String.t()}

Returns image url for provided Rsim.Image ID and specified width and height.

If resized image does not exist - parent image will be resized and saved to storage and repo, resized image url will be returned.

{:ok, image_url} = Rsim.ImageFetcher.get_image_url(“2f8e8e23-ee58-47bb-9610-6881652a1f34”, 150, 200)