Skip to content
Sitemason - Build on Us

SMImage Class Reference

Methods

getAlt

(string) getAlt()
A string
6.0

Information

Returns the data in the "alt" field of the Picture tab.

getCaption

(string) getCaption()
A string
6.0

Information

Returns the data in the "Caption" field of the Picture tab.

getCopyright

(string) getCopyright()
A string
6.0

Information

Returns the data in the "Copyright" field in the Picture tab.

getCreationTimestamp

(string) getCreationTimestamp()
A string (ISO 8601 date format)
6.0

Information

Returns the timestamp of when the file was created in Sitemason.  The timestamp returned will be in ISO 8601 format.

getFilename

(string) getFilename()
A string
6.0

Information

Returns the filename of the file.

getFileSize

(int) getFileSize()
An integer
6.0

Information

Returns the size of image (file) in bytes.

getImageSizeWithLabel

(SMImageSize) getImageSizeWithLabel (string)
A string
A SMImageSize object
6.0

Information

Returns the SMImageSize object belonging to the image whose label property is equal to the given string.

getKey

(string) getKey ()
A string
6.0

Information

Returns the Image's key.  At the moment, Sitemason supports only one Image key: "image1" (since there is currently only one Image per Item).  Assigning multiple Images per Item will be supported in the future, with each of those Images supporting a unique key.

See the overview of Sitemason Image Management for further details on SMImage vs SMImageSize.

getParentItem

(SMItem) getParentItem()
An SMItem object
6.0

Information

Returns the SMItem that the image belongs to.

getTitle

(string) getTitle()
A string
6.0

Information

Returns the "title" property as set in the Picture tab.

getURL

(string) getURL()
A string
6.0

Information

Returns the URL to the original (source) image that was uploaded via the Picture tab.