Revecto
Templates

Template assets

Upload images and fonts to a template and reference them with asset:.

Upload images and fonts to a template at app.revecto.dev/templates, then reference each by filename with asset:<filename>.

Reference an asset

asset:<filename> is replaced by the uploaded asset in an <img src> and in a CSS url(), including @font-face sources. Anywhere else it is left as written.

<style>
  @font-face {
    font-family: "Brand";
    src: url("asset:Brand-Regular.ttf");
  }

  body {
    font-family: "Brand";
  }
</style>
<img src="asset:logo.png" alt="Logo" />

A reference to a filename the template has no asset for is refused with 400 unknown_asset.

Accepted files

RuleDetail
TypesPNG, JPEG, GIF, WebP, AVIF, SVG, WOFF2, WOFF, TTF, OTF. The type is detected from the file's content; the extension is ignored.
SVGRefused if it contains scripts, foreignObject, event-handler attributes or entity declarations.
FilenameA–Z, a–z, 0–9, ., _ and -, 1 to 100 characters, unique within the template.

Limits

The size of an asset and the number of assets per template depend on your plan; see Plans and limits.

Template assets and remote resources share one cap of 12 MiB of inlined data per render; see Remote resources.

With Forme

Forme renders only some of the accepted types:

  • Images: PNG, JPEG and WebP. SVG, GIF and AVIF images are not rendered.
  • Fonts: TrueType only. See Fonts.

On this page