Developers

Asset

Describes a file uploaded by you or any other user who has access to edit your site. Assets can normally be accessed through mediaset.

Available properties

filename

File name of the asset

large_thumbnail_url

If current asset is an image, it returns full path to large thumbnail.

medium_thumbnail_url

If current asset is an image, it returns full path to medium sized thumbnail.

url, original_url

If current asset is an image, it returns full path to original uploaded image.

preview_thumbnail

Returns the medium-sized thumbnail

width

Returns width of an image in pixels.

height

Returns height of an image in pixels.

image?

Returns true if the asset is an image

sizes

Returns an array of image size variants

to_json

Serializes the asset into a JSON string