XooCode(){

ImageObject

ImageObject is the schema.org type for image metadata. It goes beyond a bare URL to describe dimensions, captions, the creator, the copyright holder, and the license. Google reads ImageObject for two things: the licensing badge in Google Images (showing who owns the image and under what terms) and richer image metadata in search results. It nests inside Article, Product, Person, and nearly every other type that has an `image` property.

Full example of schema.org/ImageObject json-ld markup

The markup is verified as valid with Rich Results Test from Google.

schema.org/ImageObject
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ImageObject",
  "@id": "https://janexoo.com/images/jane-xoo-portrait-1945.jpg#image",
  "contentUrl": "https://janexoo.com/images/jane-xoo-portrait-1945.jpg",
  "url": "https://janexoo.com/gallery/portrait-1945",
  "name": "Jane Xoo at Rigshospitalet, 1945",
  "caption": "Dr. Jane Xoo in the pediatric ward at Rigshospitalet, Copenhagen, 1945. Photograph by Erik Lindberg.",
  "description": "Black-and-white portrait of pediatrician Jane Xoo standing in the children's ward at Rigshospitalet during her residency year.",
  "width": "2400px",
  "height": "1600px",
  "encodingFormat": "image/jpeg",
  "uploadDate": "2024-03-10",
  "creator": {
    "@type": "Person",
    "name": "Erik Lindberg",
    "url": "https://janexoo.com/photographers/erik-lindberg"
  },
  "copyrightHolder": {
    "@type": "Organization",
    "name": "Lindberg Estate",
    "url": "https://janexoo.com/photographers/erik-lindberg"
  },
  "copyrightYear": 1945,
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "acquireLicensePage": "https://janexoo.com/gallery/portrait-1945/license",
  "creditText": "Photo: Erik Lindberg / Lindberg Estate, CC BY 4.0"
}
</script>

contentUrl vs url

contentUrl is the direct URL to the image file (the .jpg or .png). url is the URL of the page that features the image (a gallery page, an article page, or a dedicated image page). When using ImageObject as a standalone block, set both. When using it inline inside another type (like Article), contentUrl is the important one because it tells Google where to fetch the actual image.

license and acquireLicensePage

The license property takes a URL to the license text (like a Creative Commons deed). acquireLicensePage is a URL where someone can get permission to use the image. Google uses both to power the "License" badge in Google Images. Without these fields, Google may still show the image but will not display licensing information. Set creditText to the attribution string users should copy when reusing the image.

width and height

Specify dimensions as text values with the unit: "2400px" or use a QuantitativeValue object with value and unitCode. Plain numbers without a unit are ambiguous. Google uses dimensions to select the right image for different display contexts (thumbnails, full-size, AMP).

Minimal valid version

The smallest markup that still produces a valid ImageObject entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/ImageObject (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ImageObject",
  "contentUrl": "https://janexoo.com/images/jane-xoo-portrait-1945.jpg",
  "caption": "Dr. Jane Xoo at Rigshospitalet, Copenhagen, 1945"
}
</script>

Google rich results this unlocks

ImageObject is a structural type. It does not produce a rich result on its own.

Its value comes from combining it with a primary type whose markup earns a rich result (Article, Product, Event, and so on). ImageObject becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.

Common ImageObject mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    Using url instead of contentUrl for the image file

    Wrong
    "url": "https://example.com/images/photo.jpg"
    Right
    "contentUrl": "https://example.com/images/photo.jpg"

    contentUrl is the direct link to the image file. url is the link to the page about the image. Google needs contentUrl to fetch and index the actual image. If you only set url and it points to an HTML page, Google cannot extract the image.

  2. 02

    Missing license URL for licensing badge

    Wrong
    "license": "Creative Commons BY 4.0"
    Right
    "license": "https://creativecommons.org/licenses/by/4.0/"

    license must be a URL pointing to the license text, not the name of the license. Google uses this URL to verify the license type and display the appropriate badge in Google Images. A plain text string is not a valid URL and Google will ignore it.

  3. 03

    Dimensions as bare numbers without units

    Wrong
    "width": 2400
    Right
    "width": "2400px"

    Width and height should include the unit. A bare number is ambiguous (pixels? inches? centimeters?). Use "2400px" as a string, or use a QuantitativeValue object with value and unitCode for more precision. Google handles "2400px" correctly for image sizing.

  4. 04

    creditText missing when license is set

    Wrong
    (license and acquireLicensePage present but no creditText)
    Right
    "creditText": "Photo: Erik Lindberg / Lindberg Estate, CC BY 4.0"

    creditText provides the attribution string that users should include when reusing the image. Google displays it alongside the licensing badge in Google Images. Without it, users who want to credit the image properly have no guidance, and Google may show incomplete licensing information.

About the example data

This is the 1945 portrait of Jane Xoo taken at Rigshospitalet in Copenhagen by the fictional photographer Erik Lindberg. The same image URL appears as the `image` property in the Person example. Here it is shown as a full ImageObject with licensing metadata, dimensions, and creator attribution.

Comments

Loading comments...

Leave a comment