Package

ViewHelpers

ViewHelper Documentation

uri.image

Resizes a given image (if required) and returns its relative path.

= Examples =

<f:uri.image src="EXT:myext/Resources/Public/typo3_logo.png" /> typo3conf/ext/myext/Resources/Public/typo3_logo.png or (in BE mode): ../typo3conf/ext/myext/Resources/Public/typo3_logo.png

<f:uri.image image="{imageObject}" /> fileadmin/images/image.png or (in BE mode): fileadmin/images/image.png

{f:uri.image(src: 'EXT:myext/Resources/Public/typo3_logo.png', minWidth: 30, maxWidth: 40)} typo3temp/pics/[b4c0e7ed5c].png (depending on your TYPO3s encryption key)

<f:uri.image src="NonExistingImage.png" /> Could not get image resource for "NonExistingImage.png".

Arguments

src string

image anySimpleType

width 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.

height 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.

minWidth integer

minimum width of the image

minHeight integer

minimum height of the image

maxWidth integer

maximum width of the image

maxHeight integer

maximum height of the image

treatIdAsReference boolean

given src argument is a sys_file_reference record

crop anySimpleType

overrule cropping of image (setting to FALSE disables the cropping set in FileReference)

ViewHelper Resources

Schema Resources