---
name: "Mastodon::Entity::Attachment"
section: "3pm"
platform: "linux"
package: "libmastodon-client-perl"
version: "0.017-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Mastodon::Entity::Attachment"
---

# Mastodon::Entity::Attachment(3pm)

A Mastodon media attachment

## NAME

Mastodon::Entity::Attachment - A Mastodon media attachment

## DESCRIPTION

This object should not be manually created. It is intended to be generated from the data received from a Mastodon server using the coercions in Mastodon::Types.

For current information, see the Mastodon API documentation \<https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#attachment\>

## ATTRIBUTES

- **id**

  ID of the attachment.

- **type**

  One of: "image", "video", "gifv".

- **url**

  URL of the locally hosted version of the image.

- **remote\_url**

  For remote images, the remote URL of the original image.

- **preview\_url**

  URL of the preview image

- **text\_url**

  Shorter URL for the image, for insertion into text (only present on local images).

## AUTHOR

- •

  José Joaquín Atria \<jjatria@cpan.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by José Joaquín Atria.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
