Image

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\Image
Since
3.0.0

Class Image variable.

View source (opens new window)

# Protected Properties

# path

Type
string (opens new window), null (opens new window)
Default value
null

View source (opens new window)

# size

Type
array (opens new window), null (opens new window)
Default value
null

View source (opens new window)

# url

Type
string (opens new window), null (opens new window)
Default value
null

View source (opens new window)

# Public Methods

Method Description
__construct() Constructor
getHeight() Returns the image's height.
getSize() Returns an array of the width and height of the image.
getUrl() Returns the image's URL.
getWidth() Returns the image's width.

# __construct()

Constructor

View source (opens new window)

Arguments

# getHeight()

Returns the image's height.

View source (opens new window)

Returns

integer (opens new window)

# getSize()

Returns an array of the width and height of the image.

View source (opens new window)

Returns

array (opens new window)

# getUrl()

Returns the image's URL.

View source (opens new window)

Returns

string (opens new window)

# getWidth()

Returns the image's width.

View source (opens new window)

Returns

integer (opens new window)