OpenGraph 0.3.0: A new editor, buttons and share images for any module
OpenGraph 0.3.0 moves the share image module to PhoenixKit 2.0, rebuilds the template editor and renderer on the OpenFresco library, and opens share images to modules other than Publishing.
A rebuilt editor
The canvas editor and the PNG renderer now come from OpenFresco. You edit the card directly inside the preview: tabs switch the frame around it between Card, Facebook, X (Twitter), LinkedIn and Discord / Slack, and the card stays editable in each. A toggle switches between Sample values, which fills slots with sample text and a placeholder image, and Raw variables, which shows the {{slot}} and [[global]] tokens.
There is a new Button element, a call-to-action whose width can grow with its label, so a translated label still fits. Elements can be anchored to another element, above or below it with a gap, instead of sitting at a fixed position. Backgrounds can be a gradient, images can fade out toward one edge, and text breaks lines properly in languages such as Chinese, Japanese and Thai.
Existing templates keep working without a migration. A template saved by the old editor is converted when it is loaded, and the next save stores it in the new format.
Share images for any module
Until now only Publishing could ask for a share image. Any module can now call PhoenixKitOG.og_image_url/5 with its own list of scopes, from the most specific to a default, and get back the address of a rendered PNG, or :none when nothing is assigned, the module is off or rendering fails. It never raises, so a page cannot break on its share image. The Assignments page in the admin still offers Publishing scopes only.
Upgrading
OpenGraph 0.3 requires PhoenixKit 2.0 and no longer works with core 1.7. Core 2.0 starts its migrations from a single V135 baseline and refuses to migrate a database below it. Check mix phoenix_kit.status before upgrading. If the database is below V135, install phoenix_kit 1.7.236 first, migrate until the version is at least V135, then move to 2.0 together with this release.
The module now depends on open_fresco and unicode_string, which mix deps.get pulls in. Rendering still needs either {:resvg, "~> 0.5"} in your app or one of the resvg command, rsvg-convert or ImageMagick on the server; without them no image is rendered, a warning goes to the log and pages keep their own share image.
Full release notes: OpenGraph 0.3.0
0.3.0 · 10 August 2026
Changed
-
⚠️ Requires
phoenix_kit ~> 2.0. The core pin moved to~> 2.0, so this release no longer resolves against core 1.7.Core 2.0.0 squashes the migration chain into a single
V135baseline and makes V135 the chain’s floor:mix ecto.migratenow refuses on a database below it rather than migrating. Checkmix phoenix_kit.statusbefore upgrading. A host below V135 must installphoenix_kit 1.7.236— the migration bridge, the last release carrying the full pre-squash chain — migrate until the reported version is at least V135, and only then move to 2.0.This package does not call migration internals, so the change is the pin itself.
Added
- Any module can render an OG image (PR #5).
PhoenixKitOG.og_image_url/5is now the generic entry point; the previous publishing-only coupling lived in the call shape, not in anything essential. Scene storage plus the OpenFresco editor and renderer sit behind it.
Changed
mix precommitpasses again. It had been failing onmain— 22 credo findings, unchanged since well before this release. Cleared all 22: missing aliases for nested modules, six too-deeply-nested function bodies extracted into named helpers, and four over-complex dispatch functions inSceneEdit(update_element/4,update_canvas/3,set_anchor/4,insert/2) re-shaped from widecond/caseblocks into function clauses over the same keys. All behaviour-preserving;scene_edit_test.exspasses throughout.- Clearing credo let dialyzer run for the first time (
quality.cihalts at the first failure). Six findings surfaced, none a defect — two are artifacts of the optional PNG rasterizer backend being absent in this package’s own environment, four are defensive clauses dialyzer can prove dead from today’s callers. Recorded in a new.dialyzer_ignore.exs, each with its reason. - The optional calls into
phoenix_kit_publishinguseapply/3so dialyzer does not reportunknown_functionfor a peer that is not a dependency. The runtime guards (Code.ensure_loaded?+function_exported?+rescue) are unchanged and remain the real contract.
OpenGraph 0.3.0. Install or update: {:phoenix_kit_og, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.