BIMI SVG Tiny PS Logo Requirements: The Byte-by-Byte File-Format Reference (Root Attributes, Required Elements, Forbidden Elements, Forbidden Attributes, File-Size Cap, Aspect Ratio, Title Accessibility, Solid Background, 7 Worked Examples, Validation Toolchain, 11 Common Mistakes)

The first deep-dive spoke off the BIMI pillar (help_bimi_explained.php). Where the pillar covers the protocol surface (DNS record, VMC, mailbox-provider compatibility), this page is the byte-by-byte file-format reference for the SVG Tiny PS profile every BIMI logo must conform to. Four required root attributes (version="1.2", baseProfile="tiny-ps", xmlns, square viewBox), required <title> first-child for accessibility + validator compliance, the categorical forbidden-element / forbidden-attribute lists with rationale for every entry, the 32KB cap and 1:1 aspect rule, the solid-background-for-dark-mode requirement, 7 worked examples covering the minimal compliant shape plus the 6 most common rejection cases, the BIMI Group converter + SVGO + validator toolchain, and 11 common Tiny PS mistakes that ship most BIMI deployment debugging tickets.

This reference is provided in English. The SVG Tiny PS profile is specified in English-language BIMI Group documents (https://bimigroup.org/creating-bimi-svg-logo-files/) and W3C SVG Tiny 1.2 (https://www.w3.org/TR/SVGTiny12/). The canonical attribute and element names (baseProfile="tiny-ps", version="1.2", viewBox, <title>, <desc>, xmlns) are protocol identifiers that do not translate. We keep the body in the source language so technical terms remain consistent with the specifications.

TL;DR

  • SVG Tiny PS (Portable/Secure) is the strict SVG sub-profile that BIMI logos MUST conform to. It is profiled by the BIMI Group SVG profile specification on top of SVG Tiny 1.2.
  • Root <svg> MUST declare version="1.2", baseProfile="tiny-ps", xmlns="http://www.w3.org/2000/svg", and a square viewBox (1:1 aspect).
  • A <title> element is REQUIRED as the FIRST child of <svg>, containing the company name (accessibility + validator check).
  • Forbidden categorically: <script>, event handlers (onload, onclick), <a> hyperlinks, <animate> / <animateMotion> / SMIL, external references (<image href="...">, xlink:href to remote URLs, @font-face), <foreignObject>, embedded raster images (PNG/JPEG via <image>).
  • File size cap: 32KB. Realistic optimization target with SVGO configured for Tiny PS is 4-8KB.
  • Solid (non-transparent) background: the logo must render correctly against both light- and dark-mode inbox themes.
  • SVG Tiny PS is what makes inline mailbox-UI logo rendering safe — it is the security and performance floor of the BIMI standard, not optional styling preferences.

1. What is SVG Tiny PS?

SVG Tiny PS (Portable/Secure) is a strict sub-profile of SVG Tiny 1.2 defined by the BIMI Group SVG profile specification. The profile strips everything from SVG that could be a security, privacy, rendering, or performance risk inside a mailbox UI: no scripts, no animation, no interactivity, no external references, no raster embedding, no foreign objects, and a narrow allow-list of filters and gradients.

The profile exists because a mailbox UI renders inbox logos inline alongside attacker-controlled content (mail messages). A full-featured SVG would be a category-A attack surface: scripts could exfiltrate inbox content, external references could leak the recipient's IP and email open status, animation could perform CPU-burn or denial-of-service attacks, foreign objects could escape the SVG sandbox. Tiny PS removes every one of those vectors so the logo is provably safe to render without further sanitization.

SVG Tiny PS is a logo file format, not a protocol primitive. It does not authenticate anything; it does not affect mail delivery. Its sole purpose is to be the rendered artefact at the end of a successful BIMI pipeline: DNS lookup returns the BIMI record, receiver fetches the SVG from l=, validates against the VMC at a=, and renders the SVG inline next to the message.

This page is the byte-by-byte file-format reference for SVG Tiny PS. For the protocol-level BIMI surface (DNS record syntax, VMC, mailbox-provider compatibility), see the BIMI pillar page.

2. Required root <svg> attributes

The root <svg> element MUST carry the following attributes. Validators reject the file if any are missing or carry a different value.

Attribute Required value Why
version "1.2" Pins the file to the SVG Tiny 1.2 base specification. Other version values (e.g. "1.1") are rejected because they imply a different element / attribute allow-list.
baseProfile "tiny-ps" The marker that opts the file into the BIMI Tiny PS profile. Validators check this attribute first; if absent, the file is rejected regardless of other content.
xmlns "http://www.w3.org/2000/svg" The standard SVG namespace. Without it the file is not a valid SVG document at the XML layer, before any Tiny PS profile check runs.
viewBox square (1:1 aspect) Mailbox UIs render the logo in a square avatar slot. A non-square viewBox (e.g. "0 0 128 64") is either cropped to square (with center bias) or rejected by strict validators. The canonical pattern is "0 0 64 64" or any other width-equals-height pair.

Optional but recommended attributes:

  • preserveAspectRatio="xMidYMid meet" — explicitly center-aligns the rendered logo within the avatar slot. The default xMidYMid meet is what receivers apply anyway, but declaring it explicitly removes ambiguity.
  • width / height — the BIMI Group profile does not require these on the root element (the receiver sizes the logo to the avatar slot regardless), but declaring them matching the viewBox dimensions does no harm and helps non-BIMI consumers of the file (file-manager thumbnails, editor previews).

3. Required structural elements

A compliant SVG Tiny PS file contains the following structural elements in document order:

  1. XML declaration as the first line of the file: <?xml version="1.0" encoding="UTF-8"?>. Required for explicit encoding signalling. UTF-8 is the only accepted encoding.
  2. Root <svg> element with the four required attributes listed in section 2.
  3. First child: <title> containing the company name as plain text. The title element MUST come before any rendering element. (See section 7 for the accessibility rationale.)
  4. Optional second child: <desc> for a longer description of the logo (extended alt-text). If present, MUST appear after <title> and before any rendering element.
  5. Rendering elements in document order: <rect>, <circle>, <ellipse>, <line>, <polyline>, <polygon>, <path>, <text>, and grouping via <g>. Solid fills only — no external references.

No other top-level elements are permitted. The profile is deliberately minimal: every element that is in the file is one a malicious actor cannot abuse, because the abuse vectors have been excluded by the profile definition.

4. Forbidden elements

The following SVG elements are categorically forbidden in SVG Tiny PS. Validators reject the file if any are present.

Element Why forbidden
<script> Scripting is the primary attack surface for SVG-based exfiltration and XSS. Tiny PS forbids it under all circumstances; there is no allow-list, no inline-only mode, no exception for empty handlers.
<a> SVG hyperlinks would let an inbox-rendered logo navigate the user away from the mailbox UI when clicked. Forbidden to prevent click-bait and phishing redirects from the logo itself.
<animate>, <animateMotion>, <animateTransform>, <set>, SMIL Animation in a mailbox UI is a CPU-burn attack vector and a UX regression. The inbox is meant to be a static document surface; animated logos are forbidden outright.
<image> (raster embed) Embedded raster images (PNG, JPEG, GIF) defeat the purpose of SVG (resolution independence) and historically have been used to smuggle malicious payloads. The logo must be expressed as pure vector paths.
<foreignObject> Foreign objects let SVG embed arbitrary XML namespaces (XHTML, MathML). This is a sandbox-escape vector and is forbidden.
<use> with external href The use element itself is allowed when referencing a fragment within the same file (href="#id"), but cross-file references are forbidden because they would be a tracking-pixel vector when the receiver dereferences the URL.
<style> with external @import / @font-face External CSS or font fetches are forbidden for the same reason as external image references: leaks recipient IP / open status to the asset host.
<switch> Conditional rendering based on user-agent features is forbidden — the logo must render identically across all receivers.
Most filter primitives (<feGaussianBlur>, <feColorMatrix>, ...) A narrow allow-list of filter primitives may survive in the profile, but in practice the safe choice is to bake the desired effect into vector paths at authoring time. Filters are CPU-expensive and risk inconsistent rendering across mailbox UIs.
<mask>, <clipPath> (complex use) Allowed only in narrow Tiny-PS-permitted shapes; complex use is forbidden. If you need a masking effect, prefer expressing it as overlapping solid paths with fill-rule="evenodd".

5. Forbidden attributes

Even on otherwise-allowed elements, the following attributes are forbidden:

  • Event handlers: onload, onclick, onmouseover, onmouseout, onkeydown, and every other on* attribute. Forbidden categorically — these are scripting attack surfaces.
  • External xlink:href / href — any href attribute pointing to a remote URL (anything not starting with #) is forbidden because it leaks the recipient's IP when the receiver dereferences it.
  • JavaScript URIs: href="javascript:..." in any form, including data URLs encoding JavaScript. Forbidden because they re-introduce scripting.
  • data-* attributes carrying arbitrary application data. The Tiny PS profile prohibits author-defined metadata in the rendering tree.
  • External fill / stroke references: fill="url(https://example.com/...)" is forbidden; only fragment references (fill="url(#id)") to a definition within the same file are allowed.

6. File constraints

Beyond the element / attribute allow-list, the BIMI Group profile imposes whole-file constraints:

Constraint Value Why
Maximum file size 32KB (32,768 bytes) The mailbox UI must render the logo inline without delaying inbox paint. A realistic optimization target is 4-8KB; if the file exceeds 32KB after optimization, the design is too complex for Tiny PS.
Aspect ratio 1:1 (square) Mailbox UIs render in a square avatar slot. Non-square logos are cropped or rejected.
Encoding UTF-8 only Declared in the XML prolog (encoding="UTF-8"). Other encodings (UTF-16, ISO-8859-1) are rejected.
HTTP serving image/svg+xml The SVG host MUST serve the file with Content-Type: image/svg+xml — Tiny PS is a content-type contract as well as a file-format contract.
Caching Cache-Control: public, max-age=86400 or longer Receivers cache the SVG aggressively. A transient 503 with no cache headers can disable BIMI for the receiver's whole cache window. Set explicit, long cache lifetimes.
Transport HTTPS only The l= URL in the BIMI record MUST be HTTPS. Plain HTTP is rejected. HTTP-to-HTTPS redirects are not enough — the record itself must declare HTTPS.

7. Title and accessibility

Every BIMI-compliant SVG MUST contain a <title> element as the first child of the root <svg>. The title MUST contain the company name (or the brand name being rendered).

The title requirement serves two purposes:

  • Accessibility: screen readers announce the title when the logo is rendered. Without a title, the logo is an unannotated image and assistive technology cannot describe it. WCAG 2.2 Success Criterion 1.1.1 (Non-text Content) requires text alternatives for meaningful images; the SVG <title> IS that text alternative for inline SVG.
  • Validator compliance: the BIMI Group's reference validator checks for the presence of <title> as the first child of <svg> and rejects the file if it is missing.

Optionally, a <desc> element MAY follow <title> with a longer description of the logo (extended alt-text). The <desc> is exposed to assistive technology as a supplementary description.

Example title + desc:

<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 64 64">
  <title>Example Company</title>
  <desc>Stylised diamond mark representing Example Company's brand identity, used in customer communications since 2019.</desc>
  <rect width="64" height="64" fill="#0a3160"/>
  <path d="M8 32 L32 8 L56 32 L32 56 Z" fill="#ffffff"/>
</svg>

8. Color and background rules

SVG Tiny PS imposes color and background rules to ensure the logo renders correctly across mailbox UI themes (light, dark, high-contrast).

  • Solid background REQUIRED: the logo MUST have a solid (non-transparent) background. The standard pattern is a full-bleed <rect> as the first rendering element after <title>, filling the entire viewBox with a solid brand color, then layering the logo paths on top. Transparent backgrounds risk an invisible-logo failure when the inbox theme matches the logo color.
  • Solid fills preferred: single fill="#RRGGBB" or fill="rgb(R,G,B)" values are the safe choice. Solid fills render identically across all SVG implementations.
  • Limited gradient support: <linearGradient> and <radialGradient> are technically allowed by SVG Tiny 1.2, but the Tiny PS profile narrows the allow-list. Complex gradients with many stops, gradient transforms, or spread methods often trip validators. Test every gradient against the BIMI Group validator before shipping.
  • No CSS color names from extended palettes: stick to #RRGGBB hex notation. Some validators reject named colors (fill="rebeccapurple") outside the 16 HTML 4.01 base colors.
  • No currentColor: the keyword inherits from the rendering context (the mailbox UI's CSS) and is not stable across receivers. Always declare an explicit color.
  • No CSS opacity-based hiding: opacity="0" on rendering elements is treated as suspicious by some validators (potentially hidden malicious content). Remove any element rather than zero-opacity it.

9. Examples

9.1 Minimal compliant SVG Tiny PS

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 64 64">
  <title>Example Company</title>
  <rect width="64" height="64" fill="#0a3160"/>
  <path d="M8 32 L32 8 L56 32 L32 56 Z" fill="#ffffff"/>
</svg>

The minimum-shape Tiny PS file: explicit XML declaration, four required root attributes, <title> as first child, solid background fill, single vector path overlay, no forbidden elements or attributes. This file is well under 32KB (~250 bytes).

9.2 Compliant SVG with desc and grouping

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 128 128">
  <title>Acme Corp</title>
  <desc>Stylised A-mark in red on white square, in use since 2021.</desc>
  <rect width="128" height="128" fill="#ffffff"/>
  <g fill="#c0202c">
    <path d="M24 100 L64 24 L104 100 L88 100 L64 60 L40 100 Z"/>
    <rect x="52" y="78" width="24" height="8"/>
  </g>
</svg>

A slightly richer compliant file: optional <desc> for accessibility, <g> grouping for shared fill, multiple path / rect elements. Still well under 32KB (~400 bytes).

9.3 Common rejection — script element

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 64 64">
  <title>Example Company</title>
  <script type="application/ecmascript">
    // Even an empty script is rejected.
  </script>
  <rect width="64" height="64" fill="#0a3160"/>
</svg>

Validators reject this file with "scripts not allowed" or similar. Even an empty <script> element is forbidden; there is no exception for inert content. Remove the element entirely.

9.4 Common rejection — event handler

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 64 64"
     onload="void(0)">
  <title>Example Company</title>
  <rect width="64" height="64" fill="#0a3160"/>
</svg>

Validators reject this file because the root <svg> carries an onload attribute. All on* event handlers are forbidden categorically. Strip the attribute.

9.5 Common rejection — embedded raster

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 64 64">
  <title>Example Company</title>
  <image href="logo.png" width="64" height="64"/>
</svg>

Validators reject this file because <image> embeds raster content. The Tiny PS profile forbids raster embedding outright; the logo must be redrawn as vector paths. (Some SVG editors offer auto-trace from PNG; the output usually needs hand cleanup before it conforms to Tiny PS.)

9.6 Common rejection — non-square viewBox

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 200 80">
  <title>Example Company</title>
  <rect width="200" height="80" fill="#0a3160"/>
  <text x="100" y="50" font-family="sans-serif" font-size="32"
        fill="#ffffff" text-anchor="middle">EXAMPLE</text>
</svg>

Validators reject this file because the viewBox is rectangular (200x80, 2.5:1 aspect). Receivers render in a square avatar slot; rectangular logos crop badly. Redesign the logo as a square mark (favicon-style abbreviation, single glyph, or stylised symbol).

9.7 Common rejection — missing title

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     baseProfile="tiny-ps"
     viewBox="0 0 64 64">
  <rect width="64" height="64" fill="#0a3160"/>
  <path d="M8 32 L32 8 L56 32 L32 56 Z" fill="#ffffff"/>
</svg>

Validators reject this file because there is no <title> as the first child of <svg>. The title is required for accessibility (screen readers) and validator compliance. Add <title>Company Name</title> immediately after the opening <svg> tag.

10. Validation toolchain

A repeatable validation workflow before shipping a Tiny PS SVG to production:

  1. Author or convert the SVG: either hand-author against the rules above, or run an existing SVG through the BIMI Group converter. The converter strips unsupported elements and rewrites the file in the canonical Tiny PS shape.
  2. Optimize with SVGO: install SVGO and run with a Tiny-PS-aware config. Disable plugins that introduce forbidden elements (e.g. convertShapeToPath is fine, but removeXMLNS is NOT — Tiny PS requires the xmlns).
  3. Verify the file with a Tiny PS validator: paste the optimized SVG into the BIMI Group validator. The validator reports the exact failure mode (element name, attribute name, line number) if anything is forbidden.
  4. Confirm file size: check wc -c logo.svg shows under 32,768 bytes. If still over, re-examine the design for excessive path complexity, extraneous metadata, or whitespace bloat.
  5. Serve from HTTPS with image/svg+xml: verify curl -I https://bimi.example.com/logo.svg returns Content-Type: image/svg+xml and a long-lived Cache-Control header.
  6. Validate end-to-end via DMARC Analyzer's Domain Security Checker: the live DNS lookup confirms the BIMI record points to the correct SVG URL and that the URL responds correctly. Pair with a fresh test send to a Gmail / Apple Mail inbox to see the rendered result.

11. Common SVG Tiny PS mistakes

  • Shipping an SVG exported from Illustrator / Figma / Sketch as-is. Design-tool SVG exports almost never conform to Tiny PS — they emit metadata blocks, gradients with extra attributes, masks, embedded fonts, editor-specific extensions. Always run through the BIMI Group converter or a Tiny-PS-aware SVGO config.
  • Forgetting baseProfile="tiny-ps" on the root. Without this attribute the file is plain SVG Tiny, not Tiny PS; validators reject it. The attribute is the sole marker that opts the file into the profile.
  • Forgetting the <title> element. Validators reject the file. Screen readers cannot describe the logo. Always make the title the FIRST child of <svg>.
  • Non-square viewBox. Rectangular logos crop badly in the avatar slot or are rejected. Redesign as a square mark before shipping.
  • Transparent background. The logo must render correctly against dark inbox themes. Add a full-bleed <rect> with a solid brand color as the first rendering element.
  • Embedded raster (PNG / JPEG via <image>). Tiny PS forbids raster outright. Recreate the logo as vector paths.
  • External @font-face for text rendering. Forbidden because of the IP-leak / tracking vector. Convert text to outlined paths at authoring time.
  • JavaScript event handlers (onload, onclick). Forbidden categorically. Strip all on* attributes.
  • File size over 32KB. The profile cap. Run SVGO; consider simplifying the design if it persists above the cap after optimization.
  • Serving over plain HTTP. The l= URL in the BIMI record MUST be HTTPS. Some receivers ignore HTTP-to-HTTPS redirects; declare HTTPS in the record itself.
  • Updating the SVG without re-issuing the VMC. The VMC cryptographically binds to the exact SVG bytes; any change invalidates the binding and breaks logo display until the VMC is re-issued. Plan SVG updates as joint SVG + VMC re-issuance — see the BIMI pillar page for the VMC re-issuance workflow.

12. Frequently Asked Questions

What is SVG Tiny PS?
SVG Tiny PS (Portable/Secure) is a strict subset of SVG Tiny 1.2 defined by the BIMI Group for inbox-rendered brand logos. It forbids scripts, animation, external references, raster image embedding, interactivity, hyperlinks, foreign objects, and most filters. The root svg element must declare baseProfile="tiny-ps" and version="1.2". Tiny PS is designed so the logo can be rendered inline in a mailbox UI without any security, privacy, or performance risk.
What attributes are required on the root svg element?
A BIMI-compliant SVG must declare version="1.2", baseProfile="tiny-ps", xmlns="http://www.w3.org/2000/svg", and a viewBox with a 1:1 (square) aspect ratio on the root svg element. Validators reject the file if any of these are missing or carry a different value. The baseProfile="tiny-ps" attribute is the marker that opts the file into the BIMI strict profile.
What is the maximum file size for a BIMI SVG logo?
The BIMI Group profile caps the SVG file size at 32KB. The cap exists so the mailbox UI can render the logo inline without delaying inbox paint. A realistic optimization target for a brand mark is 4-8KB after running SVGO with a Tiny-PS-aware configuration; if your logo is still over 32KB after optimization, the design is too complex for the Tiny PS profile and needs simplification.
Does the SVG need a title element?
Yes. The Tiny PS profile REQUIRES a <title> element as a direct child of the root svg element, containing the company name. This serves two purposes: accessibility (screen readers announce the title when the logo is rendered) and validator compliance (BIMI Group validators check for its presence). The title element must be the FIRST child of svg, before any rendering element.
Why must the SVG have a square viewBox?
Mailbox UIs render the BIMI logo in a square avatar slot (the same UI affordance Gmail, Apple Mail, and Yahoo use for the contact avatar). A non-square viewBox is either cropped to square or rejected outright by validators. The canonical viewBox is "0 0 64 64" or any other equal-width/equal-height pair. Width and height attributes on the root svg are optional; the viewBox is what defines the rendering surface.
Can a BIMI SVG embed a PNG or JPEG?
No. The Tiny PS profile categorically forbids raster image embedding via the SVG <image> element. The logo must be expressed as pure vector paths (path, rect, circle, polygon, etc.) with solid fills. This rule exists because embedded raster content defeats the purpose of SVG (resolution independence, small file size, security) and historically was an attack vector for malicious payload delivery via SVG.
Can I use gradients in a BIMI SVG?
Linear and radial gradients are technically allowed by SVG Tiny 1.2 but the BIMI Group profile narrows the allow-list substantially. Solid fills (single fill="#RRGGBB" values) are the safe choice and what every major brand uses in production. Complex gradients with multiple stops or gradient transforms often trip validators; if you need a gradient effect, test the file against the BIMI Group validator before committing to the design.
Does the SVG need a solid background?
Yes. The BIMI Group profile requires the logo to render correctly against both light-mode and dark-mode inbox themes. A transparent background risks an invisible-logo failure when the inbox theme matches the logo color. The standard pattern is a full-bleed <rect> element as the first rendering element after <title>, filling the entire viewBox with a solid brand color, then layering the logo path on top.
Why is my SVG rejected for "scripts not allowed"?
The SVG contains a <script> element or an event-handler attribute (onload, onclick, onmouseover, and similar). The Tiny PS profile forbids these categorically; there is no exception, even for empty handlers. Common causes are: (1) the SVG was exported from Illustrator or Figma with default settings (they emit metadata that sometimes includes script-like content), (2) the SVG was hand-edited from a template that included interactivity, (3) the SVG was minified by a non-BIMI-aware tool that left event-handler attributes intact. Run the file through the BIMI Group converter or strip the offending elements manually.
Why is my SVG rejected for "external references"?
The SVG contains a reference to an external resource — most commonly an <image> element with an href pointing to a CDN, an xlink:href referencing a remote SVG fragment, or a @font-face declaration pulling a custom font from a remote URL. The Tiny PS profile forbids external references because they would defeat the inline-render security model (every fetch is a potential tracking pixel or malicious payload). All resources must be inlined or expressed as vector paths.

14. Audit your BIMI setup now

DMARC Analyzer's free Domain Security Checker performs live BIMI record lookups, confirms the l= SVG URL is reachable over HTTPS, and surfaces missing or expired VMC certificates. It also cross-checks the DMARC policy (p=quarantine or p=reject is required for BIMI eligibility) so you can spot the most common deployment-blocker before going live.

Audit my BIMI record Sign up — Free plan