---
title: "Image"
description: "图片信息"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image.md'
---
# Image

图片信息

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

## Type Signature

`Image`

## Fields

* `altText`

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

  用于分享图片的性质或内容的单词或短语。

* `height`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  图像的原始高度（以像素为单位）。 如果图像不是由shopline托管的，则返回 null。

* `id`

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

  全局唯一的图像ID，注意，`previewImage` 暂未支持该字段

* `url`

  [URI](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/uri.md)

  图片url

* `width`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  图像的原始宽度（以像素为单位）。 如果图像不是由shopline托管的，则返回 null。

## Schema Definition

```graphql
type Image { 
	altText: String
	height: Int
	id: ID
	url: URI
	width: Int 
}
```

## Field from

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

  媒体的图片

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

  媒体的预览图像

* [Media](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/interfaces/media.md).previewImage

  媒体的预览图像

* [ImageEdge](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image-edge.md).node

  ImageEdge 末尾的项目

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

  媒体的预览图像

* [Collection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/collection.md).banner

  banner

* [Collection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/collection.md).image

  分类图片

* [ImageConnection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image-connection.md).nodes

  ImageEdge 中包含的节点列表

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

  媒体的预览图像

* [Article](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/online-store/objects/article.md).image

  封面图

* [Product](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product.md).featuredImage

  商品首图

* [Product](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product.md).images

  商品主图

* [ProductVariant](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/products/objects/product-variant.md).image

  变体图片

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

