Skip to content

feat(reports): render embedded image blocks - #54

Merged
marcfranquesa merged 1 commit into
mainfrom
feat/report-images
Oct 14, 2026
Merged

marcfranquesa merged 1 commit into
mainfrom
feat/report-images

Conversation

@marcfranquesa

Copy link
Copy Markdown
Owner

Reports can now display saved PNG and JPEG figures alongside Markdown and CSV line charts using an explicit image block:

- type: image
  source: results/confusion-matrix.png
  alt: Confusion matrix showing errors between classes A and B
  title: Validation confusion matrix

Image blocks work in responsive rows, require alt text, and support an optional caption. Images are embedded in the HTML so saved reports remain one portable file; live reports refresh when image files change. Markdown image syntax retains its existing alt-text behavior.

Reuse confined source loading and validate image contents, dimensions, and byte budgets before rendering. Missing images show an unavailable state; invalid images fail safely without replacing a saved snapshot or the current live view. Animated PNG and other unsupported formats are rejected. No new dependencies, JavaScript, or asset routes.

Update the report, format, getting-started, and running guides, CLI help, and the report fixture with an image example.

Validation:

  • go test -race ./...
  • go vet ./...
  • Pinned Hugo documentation build with --minify --panicOnWarning
  • Browser checks for desktop/narrow layouts, offline embedding after source removal, and invalid-image live recovery
  • Three independent design passes and five final review passes; corrected and re-reviewed the APNG resource-limit bypass found in security review

@marcfranquesa
marcfranquesa merged commit 2871cb1 into main Oct 14, 2026
6 checks passed
@marcfranquesa
marcfranquesa deleted the feat/report-images branch October 14, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant