Skip to content

feat: local image embedding#40

Merged
andresilva-cc merged 1 commit intomainfrom
feat/local-images
Mar 19, 2026
Merged

feat: local image embedding#40
andresilva-cc merged 1 commit intomainfrom
feat/local-images

Conversation

@andresilva-cc
Copy link
Copy Markdown
Contributor

Summary

  • Local <img src="./logo.png"> and CSS url(./bg.jpg) are converted to base64 data URLs
  • Works in <img> tags, inline styles, <style> blocks, and config.css files
  • Paths resolve relative to the composition file
  • Supports PNG, JPEG, GIF, WebP, SVG, AVIF, ICO, BMP
  • Warns at >5MB per file, descriptive error for missing files
  • .gitignore simplified (removed blanket *.png ignore)

Closes #26

Test plan

  • 255 tests pass (27 new: 24 unit + 3 integration)
  • CLI: <img src> renders local image
  • API: returns valid PNG with embedded image
  • CSS url() in config.css files works
  • CSS url() in inline styles works
  • All three visually verified

<img src="./logo.png"> and CSS url() references are read from disk
and embedded as base64 data URLs before rendering. Supports PNG,
JPEG, GIF, WebP, SVG, AVIF, ICO, BMP. Paths resolve relative to
the composition file.

Closes #26
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grafex Ready Ready Preview, Comment Mar 19, 2026 11:33pm

@andresilva-cc andresilva-cc merged commit 600c227 into main Mar 19, 2026
5 checks passed
@andresilva-cc andresilva-cc deleted the feat/local-images branch March 19, 2026 23:35
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.

feat: local image embedding (<img src="./logo.png">)

1 participant