getImage
(Redirected from macros:Functions:getImage)
getImage() Function
• Introduced in version 1.3b48
Usage
getImage(tokenRef)
getImage(tokenRef, size)
Parameters
tokenRef
- Either the tokenid
or Token Name of the token for which you want to retrieve the token image, defaults to the Current Token.size
- Image size. Optional. Specify the size of the image that is called out in the asset string returned.
Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.
Example
To display the image from an image token called
image:Map
you can do the following:
<img src="[r: getImage('image:Map')]"></img>
Alternatively this can be used to retrieve a normal token:
<img src="[r: getImage('Dragon')]"></img>
To display the image in chat with a max dimension of 100:
<img src="[r: getImage('Hero',100)]"></img>
See Also
getTokenImage (which you can give the size as parameter)