---
title: "Uri.image ViewHelper <lim:uri.image>"
manual: "LIA Imageserver"
version: "1.2"
permalink: "https://docs.typo3.org/permalink/lia/lia_imageserver:lia-liaimageserver-uri-image@1.2"
source: "ViewHelpers/LiaImageserver/Uri/Image.rst"
modified: "2026-09-16T09:22:52+00:00"
---

# Uri.image ViewHelper `<lim:uri.image>`

This ViewHelper generate an uri for the given image.

## Examples

```html
<picture>
    <lim:uri.image
        treatIdAsReference="true"
        src="{image.uid}"
        alt="{image.alternative}"
        width="600"
        height="400"
        cropVariant="pasteHereYourCropVariant"
        imageServerOptions="{fm: 'pjpg', q: 'lossless'}"
        passThrough="true"
    />
</picture>
```

To use the cropping add a `m` to the `width` and the `height`. It looks like this.

```html
<picture>
    <lim:uri.image
        treatIdAsReference="true"
        src="{image.uid}"
        alt="{image.alternative}"
        width="600m"
        height="400m"
        cropVariant="pasteHereYourCropVariant"
        imageServerOptions="{fm: 'pjpg', q: 'lossless'}"
        passThrough="true"
    />
</picture>
```

You can also use this ViewHelper as inline notation.

```html
<picture>
    {lim:uri.image(treatIdAsReference: true, src: image.id, alt: image.alternative, width: '600c', height: '400c', cropVariant: 'pasteHereYourCropVariant', imageServerOptions: '{fm: "pjpg", q: "lossless"}', passThrough: true)}
</picture>
```

**Arguments**

The following arguments are available for the uri.image ViewHelper:

-   **absolute**

    -   *Type:* bool
    -   *Default:* false

    Force absolute URL

-   **crop**

    -   *Type:* string|bool

    If you want to deactivate cropping of the image, set this attribute to \`true\`

-   **cropVariant**

    -   *Type:* string
    -   *Default:* 'default'

    If you have defined multiple cropping variants enter here the cropping variant you want to use for the cropping of your image.

-   **fileExtension**

    -   *Type:* string

    Custom file extension to use

-   **height**

    -   *Type:* string

    height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.

-   **image**

    -   *Type:* object

    a FAL object (\\TYPO3\\CMS\\Core\\Resource\\File or \\TYPO3\\CMS\\Core\\Resource\\FileReference)

-   **imageServerOptions**

    -   *Type:* array
    -   *Default:* array (
    )

    Imageserver related options to be passed to. You can pass any valid Imageserver option. This options will overrule all other defined attributes

-   **maxHeight**

    -   *Type:* int

    maximum height of the image

-   **maxWidth**

    -   *Type:* int

    maximum width of the image

-   **minHeight**

    -   *Type:* int

    minimum height of the image

-   **minWidth**

    -   *Type:* int

    minimum width of the image

-   **passThrough**

    -   *Type:* boolean
    -   *Default:* false

    If you have to skip the imageserver set this argument to \`true\`.

-   **src**

    -   *Type:* string
    -   *Default:* ''

    Here goes the source of the image. It can be the uid of it or a relative or absolute path to the image.

-   **treatIdAsReference**

    -   *Type:* bool
    -   *Default:* false

    If you use an UID in the \`src\` attribute you have to set this argument to \`true\` to get an result.

-   **width**

    -   *Type:* string

    width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
