Skip to content

schema/json-ld-valid: nested ImageObject in Article.image is reported as invalid #463

Closed

Description

@deniskern

Summary

schema/json-ld-valid reports Article.image must be a string or array of strings when image is a nested ImageObject. schema.org defines the range of Article.image as ImageObject or URL, and Google's Article structured-data docs show ImageObject as an accepted form. @unhead/schema-org (Nuxt) emits exactly this shape, so every Nuxt site using it is flagged.

Repro page

<!doctype html><html lang="en"><head><meta charset="utf-8"><title>json-ld ImageObject repro page</title><meta name="description" content="Minimal repro: Article with a nested ImageObject image."><script type="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"Repro","image":{"@type":"ImageObject","url":"https://example.com/a.png","width":1200,"height":630},"datePublished":"2026-01-01","author":{"@type":"Person","name":"A"},"publisher":{"@type":"Organization","name":"P"}}</script></head><body><main><h1>Repro</h1></main></body></html>
python3 -m http.server 8765
squirrel audit http://localhost:8765/ --http -f json

Actual

schema/json-ld-valid, item meta: "Validation: Article.image must be a string or array of strings" (severity "invalid", path ["image"]). The other items in the same output (publisher.logo) are unrelated to this report.

Expected

No image finding. image should accept a string, an ImageObject (or array of either).

Versions

squirrel 0.0.103, macOS, --http.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions