Image generation

NoTrack Coder generates real image files into your chat folder and references them by local path, so pages you build actually display their pictures — even when opened as file://.

The gen_image tool

The agent creates a picture with:

<gen_image path="images/hero.png">a vivid English description of the image</gen_image>

It generates the image with your connected image model, saves it as a file in the chat's working folder, and returns the relative path to drop into your HTML (<img src="images/hero.png">). It never makes up a web URL.

NoTrack Coder ships with a built‑in image model — NoTrack Media — so image generation works out of the box, no setup. Generated‑image cards and captions are labeled NoTrack Media (the underlying model name stays behind the scenes). You can also connect your own image endpoint and route to it; when the model needs an image it uses run_on_model to the image capability automatically.

Offline / no model → placeholder

If no image model is installed or ComfyUI isn't running, gen_image doesn't fail the build — it saves a self‑contained SVG placeholder (a gradient with your caption) at the same name (.svg) so the page still works. Replace it later once an image model is available. Always use the exact path returned in the tool result.

Auto‑realising broken images in HTML

When the agent writes or edits an .html file, NoTrack Coder scans every <img> and repairs the broken ones automatically:

  • external URLs (e.g. via.placeholder.com),
  • made‑up web URLs,
  • files that don't exist, and
  • files that exist but aren't valid images (e.g. an HTML error page a curl saved as .png).

For each, it generates a real local image (or an SVG placeholder), writes the raw bytes directly into the chat folder (no curl, no redirects), and rewrites the src to the local path. Validity is checked by image magic bytes (PNG/JPEG/GIF/WEBP/BMP/SVG). The result: pages open with every image showing, not a wall of broken icons.

Prompt language

Describe images in English for best results — NoTrack Coder rewrites your request into a clean image prompt before sending it to the model, so a Ukrainian request still produces the right picture.

Next: Connectors (MCP).