A media attachment to a wall post, a comment, or a private message.

type
enum

The type of the attachment. Determines which one of the other fields is populated.

Possible values: photo, graffiti, video, audio, poll.

photo
photo

When type is photo, an object representing the photo.

graffiti
object

When type is graffiti, an object representing the graffiti. Only exists on top-level wall posts.

url
string

The URL of the full-size graffiti image.

preview_url
string

The URL of the smaller graffiti image for preview purposes.

width
integer (positive)

The width of the graffiti.

height
integer (positive)

The height of the graffiti.

video
object

When type is video, an object representing the video. Note: full support for videos will come in a future version of Smithereen. Currently, only the data provided by the remote server is returned, including a direct link to the video file on that server. The only field that’s guaranteed to be present is url.

url
string

The direct link to the video file. Most probably an MP4 with H264 and AAC, but no guarantees are made.

width
integer (positive)

The width of the video.

height
integer (positive)

The height of the video.

blurhash
string

The BlurHash for the thumbnail.

description
string

The description for this video, often used as an “alt text” to describe the video for visually-impaired users.

audio
object

When type is audio, an object representing the audio file. Note: full support for audio files will come in a future version of Smithereen. Currently, only the data provided by the remote server is returned, including a direct link to the audio file on that server. The only field that’s guaranteed to be present is url.

url
string

The direct link to the audio file.

description
string

The textual description of this audio file.

poll
poll

When type is poll, an object representing the poll.