Media figures (E)
Images and files on a public page, in one item. Today, read from lisp/public-pages.lisp and not run: every :image / :image-list field renders in one block after the Markdown fields as <figure><img></figure>, with no caption and the record title (else the file name) as alt text; a gallery's order is whatever the query returns (no ORDER BY); an :image-list field is also a list field, so the relations list prints it a second time, as Images: /a.png, /b.png; a PDF is a 404 on /p/files/ (png, jpg, jpeg, gif and webp only); the preview image comes only from an image field, never from an inline Markdown image.
The ask:
- Figures: one
<figure>per image. The caption is the image's own (vocabulary and delivery: item (A)), shown as<figcaption>and used as alt text. A blank caption shows nothing under the figure and leaves the file name as alt text: a visible path is the raw-path row back again. - Gallery order: by the image type's
:path tfield, the file name. - No second printing: image widgets never reach the list rows.
- PDFs:
pdfjoins the file route's whitelist (application/pdf;nosniffkept), and a file that is not an image renders as a card: a badge, the file name, and a link that opens it in a new tab. No preview inside the page (Donnie, 2026-11-29). The in-app half is item (B). - Preview image:
og:imagefalls back to the first inline Markdown image when the record has no image field.
HTML and SVG stay off the route: both can run script on the site's origin. Consumer: the blog, item (I). Tests beside the renderer suites in tests/public-pages-tests.lisp.
- Slot
- 7212
- Status
- 10 Open
- Tags
- mvp, backend, public, blog
- Contributors
- Donnie, Sofia