---
title: "SVG"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:cobj-svg@main"
source: "ContentObjects/Svg/Index.rst"
modified: "2026-09-15T19:22:01+00:00"
---

# SVG

With this object type you can insert a SVG. You can use XML data directly
or reference a file.

-   [Properties](https://docs.typo3.org/permalink/t3tsref:properties@main)
-   [Example](https://docs.typo3.org/permalink/t3tsref:example@main)

## Properties

### cache

-   **cache**

    -   *Type:* [cache](https://docs.typo3.org/permalink/t3tsref:cache@main)

    See [cache function description](https://docs.typo3.org/permalink/t3tsref:cache@main) for details.

### width

-   **width**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* 600

    Width of the SVG.

### height

-   **height**

    -   *Type:* [integer](https://docs.typo3.org/permalink/t3tsref:data-type-integer@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* 400

    Height of the SVG.

### src

-   **src**

    -   *Type:* [resource](https://docs.typo3.org/permalink/t3tsref:data-type-resource@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    SVG file resource, can also be referenced via `EXT:` prefix to
    point to files of extensions.

    **Example:**

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    src = fileadmin/svg/tiger.svg
    ```

### renderMode

-   **renderMode**

    -   *Type:* [string](https://docs.typo3.org/permalink/t3tsref:data-type-string@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    Setting `renderMode` to inline will render an inline version of the SVG.

### stdWrap

-   **stdWrap**

    -   *Type:* [->stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

## Example

Output the SVG with the defined dimensions:

**EXT:site_package/Configuration/Sets/Main/setup.typoscript**

```typoscript
10 = SVG
10 {
  width = 600
  height = 600
  src = EXT:my_ext/Resources/Public/Images/example.svg
}
```
