lim:uri.image
Based on the core ViewHelper
<f:. Adds the argument
image, which is taken into account during processing, and
returns the URL of the processed image.
For the inherited arguments see the core documentation of f:uri.image. The complete argument reference of this ViewHelper is generated from the source code, see Uri.image ViewHelper <lim:uri.image>.
Note
TYPO3 strips the leading zero from hex codes like 015069 in arguments
such as blend-. In these cases, deviate from the image server
documentation and prefix the value with #:
Hex color with leading zero
imageServerOptions="{blend-color: '#015069', blend-alpha: 80}"
Copied!
Additional arguments
| Argument | Description | Type |
|---|---|---|
image | Options passed to the image server. Any valid image server option is allowed. These options overrule all other attributes. | array |
pass | Skip the external image server. The URL points to the file processed by TYPO3. | bool |
lia | Opaque context for ModifyProcessingInstructionsEvent listeners, for example {ai. Never
forwarded to the image server. _max (the largest
requested width of the call) is injected automatically. | array |
Example
EXT:my_sitepackage/Resources/Private/Partials/Image.html
<picture>
<lim:uri.image
treatIdAsReference="true"
src="{image.id}"
width="600"
height="400"
cropVariant="tablet"
imageServerOptions="{fm: 'pjpg', q: 'lossless'}"
passThrough="true"
/>
</picture>
Copied!
To activate cropping, add the suffix m to width and height:
EXT:my_sitepackage/Resources/Private/Partials/Image.html
<picture>
<lim:uri.image
treatIdAsReference="true"
src="{image.id}"
width="600m"
height="400m"
cropVariant="tablet"
imageServerOptions="{fm: 'pjpg', q: 'lossless'}"
passThrough="true"
/>
</picture>
Copied!
Inline notation:
EXT:my_sitepackage/Resources/Private/Partials/Image.html
<picture>
{lim:uri.image(treatIdAsReference: true, src: image.id, width: '600c', height: '400c', cropVariant: 'tablet', imageServerOptions: '{fm: "pjpg", q: "lossless"}', passThrough: true)}
</picture>
Copied!