skip to Main Content

How to handle multiple image sizes?

In the Organization I have the same image with three different aspect ratios: 1:1, 16:9, 4:3

How is the correct way to add them in the JSON Linked Data format?

{
    "@type": "Organization",
    "image": [{
        "@type": "ImageObject",
        "width": 1200,
        "height": 900,
        "url": "https://domain/img_16_9.png"
    },{
        "@type": "ImageObject",
        "width": 1200,
        "height": 1200,
        "url": "https://domain/img_1_1.png"
    }]
}

I have the same in the Product property. How to add the same image to each product but in three different aspect ratios?

2

Answers


  1. I do like this:

    "image":{
    "@type":"ImageObject",
    "url":[
    "https://example.com/img/name/1x1/view.jpg",
    "https://example.com/img/name/4x3/view.jpg",
    "https://example.com/img/name/16x9/view.jpg"
    ],
    "contentUrl":"https://example.com/img/name/viewHD.jpg",
    "width":"1920",
    "height":"1730"
    }
    
    Login or Signup to reply.
  2. If you have the same image in different aspect ratios for multiple products, you can use the same approach as with the Organization schema and create an array of ImageObject for each product with the corresponding aspect ratios:

    {
      "@type": "Product",
      "name": "Product Name",
      "description": "Product description",
      "image": [
        {
          "@type": "ImageObject",
          "url": "https://domain/img_16_9.png",
          "width": 1200,
          "height": 675
        },
        {
          "@type": "ImageObject",
          "url": "https://domain/img_4_3.png",
          "width": 1200,
          "height": 900
        },
        {
          "@type": "ImageObject",
          "url": "https://domain/img_1_1.png",
          "width": 1200,
          "height": 1200
        }
      ]
    }
    

    Note that the width and height properties should correspond to the dimensions of the respective image, and not necessarily to the aspect ratio.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search