Documentation · ViewHelper reference

XSD schema file | vhs master

Uri / ImageViewHelper

Uri: Image

Returns the relative or absolute URI for the image resource or it's derivate if differing dimesions are provided. /

  • Tag usage example

    <v:uri.image src="[mixed]" relative="1" width="NULL" height="NULL" maxW="123" maxH="123" minW="123" minH="123" format="NULL" quality="123" treatIdAsReference="1" canvasWidth="123" canvasHeight="123" canvasColor="NULL" crop="NULL">
    	<!-- tag content - may be ignored! -->
    </v:uri.image>
  • Inline usage example

    {v:uri.image(src: [mixed], relative: 1, width: 'NULL', height: 'NULL', maxW: 123, maxH: 123, minW: 123, minH: 123, format: 'NULL', quality: 123, treatIdAsReference: 1, canvasWidth: 123, canvasHeight: 123, canvasColor: 'NULL', crop: 'NULL')}

Arguments

Argument Description Type
canvasColor

Background color of an optional canvas to place the image on (hex triplet).

string
canvasHeight

Height of an optional canvas to place the image on.

integer
canvasWidth

Width of an optional canvas to place the image on.

integer
crop

Information generated by the backend's graphical cropping UI

string
format

Format of the processed file - also determines the target file format. If blank, TYPO3/IM/GM default is taken into account.

string
height

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.

string
maxH

Maximum Height of the image. (no upscaling)

integer
maxW

Maximum Width of the image. (no upscaling)

integer
minH

Minimum Height of the image.

integer
minW

Minimum Width of the image.

integer
quality

Quality of the processed image. If blank/not present falls back to the default quality defined in install tool.

integer
relative

If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.

boolean
src

Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).

mixed
treatIdAsReference

When TRUE treat given src argument as sysfilereference record. Applies only to TYPO3 6.x and above.

boolean
width

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.

string
Required attribute

Revision history

commit ad650e0447d20c24256935e1d0cd192c495a766d
Author: Bjoern Fromme <*****@bjo3rn.com>
Date:   Wed Jan 30 09:35:59 2013 +0100

    [FEATURE] Add media related base VHs, add image related VH, add video VH

commit 86b105c6771d22fe9a43eb49c53bf70636067012
Author: Bjoern Fromme <*****@bjo3rn.com>
Date:   Wed Jan 30 09:40:02 2013 +0100

    [TASK] Move image and video VHs to ViewHelpers\Media subpackage

commit 49e420d2ea1ed07923a3e256a6a152b41c306869
Author: Claus Due <*****@wildside.dk>
Date:   Fri Feb 1 10:36:57 2013 +0100

    [TASK] Make src argument global for all media related VHs and allow array or Traversable objects

commit 4926809a7b528faddd4b9fa575bda5955601beed
Author: Claus Due <*****@wildside.dk>
Date:   Fri Feb 1 10:47:31 2013 +0100

    [TASK] Refactor Media / AbstractImage to Media / Image / AbstractImage

commit c89e47466c5e7d55438dbb004cc7dbfaf439db74
Author: Claus Due <*****@wildside.dk>
Date:   Sat Mar 2 19:00:23 2013 +0100

    [DOC] Doc comment for Uri / Image VIewHelper

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 4981055359c895f3869e5bd878293b3c15ed26e5
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 14:01:04 2015 +0100

    [TASK] CGL - Define classes, params, use imports

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file