Template helpers for rendering attachment URLs.
Usage
Import in your web module:
defmodule MyAppWeb do
def html_helpers do
quote do
import Attached.Web.UrlHelpers
end
end
endThen in templates:
<img src={storage_url(@user, :avatar)} />
<img src={storage_url(@user, :avatar, :thumb)} />
Summary
Functions
Returns the URL for an attachment, or nil if nothing is attached.