图像 对象
表示图像资源。
在本页面
Connections
metafields([MetafieldConnection!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafieldconnection))
与资源关联的元字段的分页列表。
| 参数 | 描述 |
|---|---|
after() [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) |
返回指定游标之后的元素。 |
before() [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) |
返回指定游标之前的元素。 |
first() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
返回n列表中的第一个元素。 |
last() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
返回n列表中的最后一个元素。 |
namespace() [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) |
在资源下查找具有特定名称空间的所有元字段。 |
reverse() [Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01) |
颠倒基础列表的顺序。 默认值: false |
privateMetafields([PrivateMetafieldConnection!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafieldconnection))
私有元字段列表。
| 参数 | 描述 |
|---|---|
after() [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) |
返回指定游标之后的元素。 |
before() [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) |
返回指定游标之前的元素。 |
first() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
返回n列表中的第一个元素。 |
last() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
返回n列表中的最后一个元素。 |
namespace() [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) |
按名称空间过滤私有元字段。 |
reverse() [Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01) |
颠倒基础列表的顺序。 默认值: false |
字段
altText([String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
共享图像性质或内容的单词或短语。
height([Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
图片的原始高度(以像素为单位)。返回null如果图像不被Shopify主持。
id ([ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
图像的唯一标识符。
metafield([Metafield](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafield))
与资源关联的元字段。
originalSrc([URL!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#url-2021-01))
原始图像作为URL的位置。
如果原始源URL中存在任何现有的转换,则这些转换将保留而不被删除。
privateMetafield([PrivateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafield))
返回通过名称空间和键找到的私有元字段。
transformSrc([URL!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#url-2021-01))
转换图像作为URL的位置。
所有转换参数都被认为是“尽力而为”。如果可以将它们应用于图像,则可以。否则,将忽略图像类型不支持的任何转换。
| 参数 | 描述 |
|---|---|
crop() [CropRegion](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/cropregion) |
根据指定区域裁剪图像。 |
maxHeight() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
图像高度,以像素为单位介于1到5760之间。 |
maxWidth() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
图像宽度,以像素为单位介于1到5760之间。 |
preferredContentType() [ImageContentType](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/imagecontenttype) |
尽力将图像转换为内容类型(支持SVG-> PNG,Anything-> JGP,Anything-> WEBP)。 |
scale() [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) |
高分辨率视网膜显示器的图像尺寸倍增器。必须介于1和3之间。 默认值: 1 |
width ([Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
图像的原始宽度(以像素为单位)。返回null如果图像不被Shopify主持。
返回图像的类型
[App.banner](https://shopify.dev/docs/admin-api/graphql/reference/apps/app#banner-2021-01)[App.icon](https://shopify.dev/docs/admin-api/graphql/reference/apps/app#icon-2021-01)[App.screenshots](https://shopify.dev/docs/admin-api/graphql/reference/apps/app#screenshots-2021-01)[CalculatedDraftOrderLineItem.image](https://shopify.dev/docs/admin-api/graphql/reference/orders/calculateddraftorderlineitem#image-2021-01)[CalculatedLineItem.image](https://shopify.dev/docs/admin-api/graphql/reference/orders/calculatedlineitem#image-2021-01)[Collection.image](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collection#image-2021-01)[CommentEventAttachment.image](https://shopify.dev/docs/admin-api/graphql/reference/events/commenteventattachment#image-2021-01)[Customer.image](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer#image-2021-01)[DeliveryCarrierService.icon](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/deliverycarrierservice#icon-2021-01)[DiscountShareableUrl.targetItemImage](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/discountshareableurl#targetitemimage-2021-01)[DraftOrderLineItem.image](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorderlineitem#image-2021-01)[LineItem.image](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem#image-2021-01)[LineItemMutable.image](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitemmutable#image-2021-01)[MediaImage.image](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/mediaimage#image-2021-01)[MediaPreviewImage.image](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/mediapreviewimage#image-2021-01)[OrderTransaction.paymentIcon](https://shopify.dev/docs/admin-api/graphql/reference/orders/ordertransaction#paymenticon-2021-01)[PriceRuleShareableUrl.targetItemImage](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/priceruleshareableurl#targetitemimage-2021-01)[Product.featuredImage](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#featuredimage-2021-01)[Product.images](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#images-2021-01)[ProductVariant.image](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#image-2021-01)[SearchResult.image](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/searchresult#image-2021-01)[Shop.productImages](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#productimages-2021-01)[Shop.uploadedImages](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#uploadedimages-2021-01)[Shop.uploadedImagesByIds](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#uploadedimagesbyids-2021-01)[SubscriptionLine.variantImage](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionline#variantimage-2021-01)
派生关系
[HasMetafields](https://shopify.dev/docs/admin-api/graphql/reference/metafields/hasmetafields)
