Releases: obasekiosa/og_ex
Releases · obasekiosa/og_ex
Release list
v0.3.0
OgEx 0.3.0
This release introduces the controller card DSL and dedicated image dispatch.
og_card :show, PostOgCardassociates a card with one controller action.Card.load/2loads image data without running the normal controller action.- A controller function passed with
load:can replace the card loader. image_route: :pathgenerates/opengraph-image/TOKENand
/twitter-image/TOKENURLs.image_route: :querygenerates?__og_ex=TOKENURLs.- Path requests can be handled by
og_ex_routes()in the router or by
plug OgEx, router: MyAppWeb.Routerin the endpoint. - Duplicate declarations and simultaneous router/endpoint integrations are
detected instead of being silently accepted. - Loader failures return non-cacheable
404or503responses. - The 0.2
render(..., og: ...)API remains available during migration.
Install:
{:og_ex, "~> 0.3.0"}v0.2.0
OgEx 0.2.0
This release introduces local and remote image sources.
- Generated HEEx cards can contain
<img>elements. - Root-relative paths load images from the Phoenix
priv/staticdirectory. OgEx.private_asset/1loads a private local file without exposing a public
URL.- HTTPS images can be downloaded from an explicit host allowlist.
- Remote loading includes byte, dimension, pixel, redirect, and timeout limits.
- Direct-image declarations can point
og:imageat an existing local or
external file instead of generating a new image. - Local image content is inspected to determine its actual format and
dimensions.
Install:
{:og_ex, "~> 0.2.0"}v0.1.0
OgEx 0.1.0
This release introduces generated social cards for Phoenix controllers.
use OgEx.Carddefines card dimensions and output format.metadata/1defines Open Graph and Twitter/X metadata.render/1defines the image with HEEx and CSS.render(conn, template, og: CardModule)adds metadata to the HTML response.- A signed query URL on the same controller route returns the generated image.
- Takumi renders PNG, JPEG, WebP, and SVG output.
- Generated images use an in-memory ETS cache and immutable response headers.
- Precompiled native libraries are available for supported Linux, macOS, and
Windows targets.
Install:
{:og_ex, "~> 0.1.0"}