image
An image, such as an image of a product or collection.
For more information about the image formats supported by SHOPLINE, visit Help Center.
Properties
The alternative text for the image, displayed when the image fails to load.
The aspect ratio of the image as a decimal.
Whether the image is associated with a variant.
true: The image is associated with a variant.false: The image is not associated with any variant.
The height of the image in pixels.
The unique identifier for the image.
If you reference the id property of the preview image of a generic_file or media object, nil is returned.
The media type. The value is fixed to image, indicating an image.
The position number of the image in the product.images or product.media array.
The preview image of the image.
This property is only available for images accessed through the following sources:
If you reference this property of an image accessed from any other source, nil is returned.
The ID of the product associated with the image.
This property is only available for images associated with products. If you reference this property of an image not associated with any product, nil is returned.
The relative URL of the image.
The width of the image in pixels.