Script: Class dw.experience.Image

Class Image

  • Object
    • dw.experience.image.Image

This class represents an image with additional configuration capabilities (e.g. optional focal point). Furthermore it provides access to meta data of the referenced image file.

See Also:

FocalPoint

ImageMetaData

Properties

file : MediaFile Read Only

The image media file from the current site's library.

focalPoint : FocalPoint Read Only

The focal point of the image.

metaData : ImageMetaData Read Only

The meta data of the physical image file. This meta data is obtained when the respective component attribute was saved from Page Designer, i.e. the underlying image is not queried for the meta data every time getMetaData() is called but only on store of the related component attribute.

Constructor Summary

This class does not have a constructor, so you cannot create it directly.

Method Summary

getFile() : MediaFile

Returns the image media file from the current site's library.

getFocalPoint() : FocalPoint

Returns the focal point of the image.

getMetaData() : ImageMetaData

Returns the meta data of the physical image file.

Methods inherited from class Object

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Method Detail

getFile

getFile() : MediaFile

Returns the image media file from the current site's library.

Returns:

the image media file, or null if not found

getFocalPoint

getFocalPoint() : FocalPoint

Returns the focal point of the image.

Returns:

the focal point, or null if not found


getMetaData

getMetaData() : ImageMetaData

Returns the meta data of the physical image file. This meta data is obtained when the respective component attribute was saved from Page Designer, i.e. the underlying image is not queried for the meta data every time getMetaData() is called but only on store of the related component attribute.

Returns:

the meta data of the image, or null if no meta data was provided with the respective component attribute