Skip to main content
Attachments can add supplementary content to any asset to help provide additional context for your labeling team. An attachment applies to an individual asset and may comprise an image, video, text, or HTML content. Markdown rendering is supported for attachments, allowing you to use to format text, add links, and include images within attachments. Multiple attachments can be linked to an singular data row.

Supported attachment types

When using an IAM delegated access path, the attachment must utilize the same cloud storage integration as the data row to which the asset is attached.

Special character handling

Please note that certain characters like #,<, > and || are not supported in URLs and should be avoided in your file names to prevent loading issues.Please refer to https://datatracker.ietf.org/doc/html/rfc2396#section-2.4.3 on URI standards.A good test for the handling of special characters is to test URLs in your browser address bar — if the URL doesn’t load properly in your browser, it won’t load in Labelbox.

Create an attachment

Attachments are created on a DataRow object. The required arguments for creating an attachment are the attachment_type and attachment_value. You can also name an attachment via the attribute attachment_name.

Create a data row with multiple attachments

Use the code snippet below to create a dataset, create a data row, and add attachments to the data row.

JSON format

Use the following format to include attachments in a JSON import file.

Create an image overlay

Image overlays are created as attachments on a data row. Only images may be attached as overlays, and they may only be attached to image assets. A maximum of 10 layers may be added per data row.

JSON format

Use the following format to include image overlays in a JSON import file.

Get an attachment

Update an attachment

You can amend one or more attributes between name, type and value. Note that attributes can only be updated to non-empty values.

Delete an attachment

Be cautious when you delete an attachment, as this operation is irreversible.

Delete all attachments for a data row

You can utilise a bulk method to delete all the attachments of a data row at once. Here again, be cautious as there is no rollback possible.