PhoenixKit 2.37.2: Preview cards take images by address
PhoenixKit 2.37.2 extends the PreviewCard component for module and app developers. On its own it changes nothing on a running site.
An image in a preview card can now be given by address, as %{src, name}, with an optional smaller :thumb_src for the strip of thumbnails. That suits pictures a host serves itself, such as page previews of a document. Both kinds of image can be mixed in one carousel, and PreviewCard.image_url/2 returns the address of an entry for a given size. Image entries may also be structs again; their name is optional.
Full release notes: PhoenixKit 2.37.2
2.37.2 · 22 September 2026
Added
PreviewCardtakes images by URL, not only as Storage files (#857). An:imagesentry may be%{src, name}, with an optional:thumb_srcfor the jump strip, alongside the Storage%{uuid, name}form — for pictures a host serves itself (a document’s page previews). Both kinds mix in one carousel.PreviewCard.image_url/2resolves an entry’s URL for a variant.
Fixed
PreviewCardimage entries may be structs again (#857 review). The alt text readimg[:name], which structs do not support; it now usesMap.get/2, so:namestays optional on maps and structs keep working.
PhoenixKit 2.37.2. Install or update: {:phoenix_kit, "~> 2.37"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.