---
title: "Media"
description: "Represents a media interface."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/common-objects/interfaces/media'
  md: 'https://developer.shopline.com/docs/storefront-api/common-objects/interfaces/media.md'
---
# Media

Represents a media interface.

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Interface

## Type Signature

`Media`

## Fields

* `id`

  [ID!](https://developer.shopline.com/docs/storefront-api/common/scalars/id.md)

  A globally-unique ID.

* `previewImage`

  [Image](https://developer.shopline.com/docs/storefront-api/common-objects/objects/image.md)

  The preview image for the media.

* `alt`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  A word or phrase to share the nature or contents of a media.

* `mediaContentType`

  [MediaContentType!](https://developer.shopline.com/docs/storefront-api/common-objects/enums/media-content-type.md)

  The media content type.

## Implemented By

* [MediaImage](https://developer.shopline.com/docs/storefront-api/common-objects/objects/media-image.md)

* [ExternalVideo](https://developer.shopline.com/docs/storefront-api/common-objects/objects/external-video.md)

* [Video](https://developer.shopline.com/docs/storefront-api/common-objects/objects/video.md)

## Schema Definition

```graphql
interface Media { 
	id: ID!
	previewImage: Image
	alt: String
	mediaContentType: MediaContentType! 
}
```

## Field from

* [MediaEdge](https://developer.shopline.com/docs/storefront-api/common-objects/objects/media-edge.md).node

  The item at the end of MediaEdge.

* [MediaConnection](https://developer.shopline.com/docs/storefront-api/common-objects/objects/media-connection.md).nodes

  A list of the nodes contained in MediaEdge.

## Interface implemented by

* [ExternalVideo](https://developer.shopline.com/docs/storefront-api/common-objects/objects/external-video.md)

  Represents a video hosted outside of Shopline.

* [Video](https://developer.shopline.com/docs/storefront-api/common-objects/objects/video.md)

  Represents a Shopline hosted video.

* [MediaImage](https://developer.shopline.com/docs/storefront-api/common-objects/objects/media-image.md)

  Represents a Shopline hosted image

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

