Grafex automatically resolves and embeds local image files so you never need a running server or a public URL to include them in a composition. When the renderer encounters anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/andresilva-cc/grafex/llms.txt
Use this file to discover all available pages before exploring further.
<img> tag or a CSS url() reference that points to a local path, it reads the file from disk and replaces the path with a base64 data URL before the page is rendered. The rendered image is fully self-contained.
Using images in JSX
Reference local image files in<img> tags using paths relative to your composition file:
./test-image.png path is resolved relative to card.tsx. If the file exists at that path, Grafex embeds it automatically — no additional configuration required.
Using images in CSS
CSSurl() references are embedded the same way, whether they appear in inline style attributes or in external CSS files loaded via config.css.
Inline style attribute:
config.css):
./hero.jpg is resolved relative to the file it appears in — the composition file for inline styles, and the CSS file for external stylesheets.
Supported formats
Grafex can embed any of the following image formats:| Extension | MIME type |
|---|---|
.png | image/png |
.jpg / .jpeg | image/jpeg |
.gif | image/gif |
.webp | image/webp |
.svg | image/svg+xml |
.avif | image/avif |
.ico | image/x-icon |
.bmp | image/bmp |
Remote URLs and data URLs
Remote URLs starting withhttp://, https://, or // are passed through unchanged — Grafex does not fetch or re-encode them. Data URLs (strings starting with data:) are also passed through as-is.
If a local image path cannot be resolved — because the file doesn’t exist or the path is wrong — Grafex throws an error with the full resolved path so you can diagnose the problem quickly.