No ImageObject schema inside Article or Product
What Is This Issue
ImageObject schema is not embedded within Article or Product schemas that use images. Instead of providing images as plain URL strings, the schema should use full ImageObject blocks with metadata like width, height, caption, and license information.
When images are declared as plain URLs (e.g., "image": "https://example.com/photo.jpg") instead of ImageObject blocks, search engines miss important metadata that could help with:
- Google Image search rich results
- AI Overview image citations
- Better understanding of image context and licensing
A proper ImageObject schema includes: url or contentUrl, width, height, caption, license, and optionally author, datePublished, thumbnail, etc.
Why Is This Important
ImageObject schema enhances image SEO and discoverability:
- Google Image rich results: Images with proper schema are eligible for badges, captions, and enhanced display
- AI search citations: AI engines like ChatGPT and Bard use ImageObject metadata to properly attribute and describe images
- Licensing clarity:
licenseproperty helps search engines understand image usage rights - Accessibility:
captionanddescriptionimprove screen reader experience - Dimension information:
widthandheighthelp browsers reserve space and prevent layout shifts
Resolving this issue improves your overall SEO health score by ensuring images are properly structured for maximum visibility and understanding.
How XeoPix Detects This
XeoPix follows these logical steps to detect missing ImageObject schema:
-
Detect parent schemas: The crawler identifies pages with
Article,Product,Recipe,VideoObject, orNewsArticleschema blocks -
Check image property format: For each schema block, the crawler examines the
imageproperty:- If
imageis a plain string URL → triggers the issue - If
imageis an array, checks each item in the array - If
imageis already an object with@type: "ImageObject"→ validates it has required properties
- If
-
Validate ImageObject completeness: If ImageObject is present, the crawler checks for:
urlorcontentUrlpropertywidthandheightproperties (recommended)captionproperty (recommended)
-
Trigger conditions: The issue is flagged when:
- A parent schema (Article, Product, etc.) has
imageas a plain URL string - ImageObject exists but is missing
url/contentUrl - ImageObject exists but is missing
widthorheight(recommendation)
- A parent schema (Article, Product, etc.) has
How To Fix
-
Identify schemas that use images: Check your
Article,Product,Recipe,VideoObject, orNewsArticleschema blocks -
Replace plain URL strings with ImageObject blocks:
Before (plain URL):
{ "@context": "https://schema.org", "@type": "Article", "headline": "Blog Post Title", "image": "https://example.com/photo.jpg" }After (ImageObject):
{ "@context": "https://schema.org", "@type": "Article", "headline": "Blog Post Title", "image": { "@type": "ImageObject", "url": "https://example.com/photo.jpg", "width": 1200, "height": 630, "caption": "Description of the image", "license": "https://creativecommons.org/licenses/by/4.0/" } } -
Include recommended properties:
urlorcontentUrl(required)widthandheightin pixels (recommended)caption(recommended for accessibility)license(if applicable)
-
Validate with Schema Markup Validator
What We Store
Storage Level
Page Level — This issue is evaluated for each individual URL that contains structured data.
Database Table / Prisma Model
PageStructuredData
Stored Fields
| Field | Type | Description |
|---|---|---|
| schemaType | SchemaType | The type of schema (e.g., Organization, Person) |
| schemaFormat | SchemaFormat | The format of the schema (JSON-LD, Microdata, RDFa) |
| schemaIdentifier | String? | Unique identifier for the schema |
| rawJson | Json? | The raw JSON-LD or structured data content |
| schemaErrors | Json? | Array of validation errors found in the schema |
| isValidSchema | Boolean? | Whether the schema is valid according to validation |
| missingFields | Json? | Array of required fields that are missing |
Detection Dependencies
- The following data sources are required to evaluate this issue:
- HTML Document — The crawler parses the HTML to find structured data (JSON-LD, Microdata, RDFa)
- Structured Data Validation — The extracted schema is validated against Schema.org definitions
- Schema Parser — JSON-LD scripts, Microdata attributes, and RDFa markup are parsed
Examples
Example 1: Converting Plain URL to ImageObject in Article
Problematic state (plain URL):
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "SEO Best Practices Guide",
"image": "https://example.com/images/seo-guide.jpg"
}Corrected state (ImageObject):
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "SEO Best Practices Guide",
"image": {
"@type": "ImageObject",
"url": "https://example.com/images/seo-guide.jpg",
"width": 1200,
"height": 630,
"caption": "A comprehensive guide to SEO best practices for 2024",
"license": "https://creativecommons.org/licenses/by/4.0/"
}
}Example 2: Multiple Images with ImageObject
Corrected state (multiple images):
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Wireless Headphones",
"image": [
{
"@type": "ImageObject",
"url": "https://example.com/headphones-front.jpg",
"width": 800,
"height": 800,
"caption": "Front view of wireless headphones"
},
{
"@type": "ImageObject",
"url": "https://example.com/headphones-side.jpg",
"width": 800,
"height": 800,
"caption": "Side view of wireless headphones"
}
]
}Example 3: ImageObject in Recipe Schema
Corrected state (Recipe with ImageObject):
{
"@context": "https://schema.org",
"@type": "Recipe",
"name": "Chocolate Chip Cookies",
"image": {
"@type": "ImageObject",
"url": "https://example.com/cookies.jpg",
"width": 1200,
"height": 800,
"caption": "Freshly baked chocolate chip cookies on a cooling rack"
}
}Unit Test
Test File
xeopix-crawling-v2/__tests__/seo-audit-checks/structuredDataRichResults/issue-154-imageobject-schema.test.js
Purpose
Validates that the crawler correctly validates ImageObject JSON-LD schemas and does not report false positives when the schema is properly formed.
Tested Function
runStructuredDataRichResults()
Issue Information
- Issue Number: 154
- Issue Code:
imageobject_schema_embedded - Toggle Group:
structuredDataRichResults
Test Scenarios
Positive Test Cases
- Valid ImageObject schema: Page has an
ImageObjectschema withcontentUrlandname— no issue reported.
Negative Test Cases
None — the test only validates that valid schemas pass.
Boundary Cases
None.
Edge Cases
- Empty HTML:
<html></html>— no crash.
Expected Outcome
Pass
Issue should not be reported when a valid ImageObject schema with required properties is present.
Fail
No negative test cases are defined.
Validation
- Correct pass-through of valid ImageObject schemas
- Graceful handling of empty HTML
Related Production Files
xeopix-crawling-v2/toggleGroups/structuredDataRichResults.jsxeopix-crawling-v2/issueCodes.jsxeopix-crawling-v2/utils/context.jsxeopix-crawling-v2/utils/issues.jsxeopix-crawling-v2/utils/schema.js
Coverage Summary
- Covers valid ImageObject schema detection
- Covers empty HTML resilience
References
- Schema.org: ImageObject — Schema.org
- Google: Image License Structured Data — Google Search Central
- MDN: Structured Data — MDN Web Docs