WooCommerce · JSON Structure

Woocommerce Store Api Store Product Image Structure

Product image with thumbnail variants.

Type: object Properties: 7
eCommerceOpen SourceOrdersProductsWordPress

StoreProductImage is a JSON Structure definition published by WooCommerce, describing 7 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id src thumbnail srcset sizes name alt

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/json-structure/woocommerce-store-api-store-product-image-structure.json",
  "name": "StoreProductImage",
  "description": "Product image with thumbnail variants.",
  "type": "object",
  "properties": {
    "id": {
      "type": "int32",
      "description": "Image attachment ID.",
      "example": 1
    },
    "src": {
      "type": "uri",
      "description": "Full-size image URL.",
      "example": "https://example.com/path"
    },
    "thumbnail": {
      "type": "uri",
      "description": "Thumbnail image URL.",
      "example": "https://example.com/path"
    },
    "srcset": {
      "type": "string",
      "description": "Responsive image srcset attribute value.",
      "example": "string-value"
    },
    "sizes": {
      "type": "string",
      "description": "Responsive image sizes attribute value.",
      "example": "string-value"
    },
    "name": {
      "type": "string",
      "description": "Image file name.",
      "example": "Example Name"
    },
    "alt": {
      "type": "string",
      "description": "Image alternative text.",
      "example": "string-value"
    }
  }
}