ImageBoss for Elixir

Use our Elixir integration to generate ImageBoss URLs from your Elixir apps. The library provides helpers to build URLs with operations (resize, cover, CDN) and options, following the same URL structure as the rest of the platform.


Installation

Add the dependency to your mix.exs (check the README for the latest version):

def deps do
  [
    {:imageboss, "~> 0.5"}
  ]
end

Then fetch dependencies:

mix deps.get

Basic example

Here is a simple example of building an ImageBoss URL in Elixir. It mirrors the standard ImageBoss URL structure (/:source/:operation/:dimensions/:options/path):

defmodule MyApp.ImageExample do
  @imageboss_base "https://img.imageboss.me"
  @source "mywebsite-images"

  # Build a cover URL with format:auto
  def cover_url(path \\ "/images/photo.jpg") do
    operation = "cover"
    dimensions = "500x300"
    options = "format:auto"

    "#{@imageboss_base}/#{@source}/#{operation}/#{dimensions}/#{options}#{path}"
  end
end

The elixir-imageboss library provides higher-level helpers so you do not have to manually concatenate segments; see its README for the exact API and more examples.


Full documentation

Options (e.g. format:auto, blur:4, download:1), operations, and signed URLs are documented in the main ImageBoss docs. For Elixir-specific helpers, configuration, and advanced usage, see elixir-imageboss on GitHub.



Questions?

If you have any questions please don't hesitate, send us a message on support[at]imageboss.me or in case of any bugs or problems with your integration you're more than welcome to open an issue.