ImageObject Schema Generator — Describe Key Images Clearly
Generate valid ImageObject JSON‑LD with canonical URL, file URL, caption, dimensions, format, and license to improve understanding and pairing with other schema.
Why many image pages underperform
Pain points we solve
- Only one URL is provided, making it unclear which is the file vs page URL.
- Captions and dimensions are missing, reducing context and quality signals.
- Primary visuals aren’t flagged as representative of the page.
- Licensing is unclear, discouraging legitimate reuse.
How SwiftSchema helps
Solution
The ImageObject generator guides both `url` (page) and `contentUrl` (file), plus `caption`, `width`, `height`, and `encodingFormat` to express quality and context.
It supports `license`, `inLanguage`, and `representativeOfPage` for primary visuals, producing copy‑ready JSON‑LD that pairs well with Product, Recipe, and Article.
How it works
How it works
- Choose ImageObject in the generator below.
- Enter `url` (canonical image page) and `contentUrl` (direct file) when available.
- Add `caption`, dimensions (`width`/`height`), and `encodingFormat` (e.g., image/webp).
- Include `license`, `inLanguage`, and set `representativeOfPage` for primary visuals.
- Copy JSON or Script, paste into the page using the image, and validate in the Rich Results Test.
Paste once per key image. Validate. Ship.
What is ImageObject structured data?
ImageObject captures the authoritative description of a single image: where it lives, what it depicts, how large it is, and whether others can reuse it. The schema complements every other high-value content type — Products rely on crisp hero shots, Recipes need gallery carousels, and Articles deserve featured images that carry captions. When you model those visuals explicitly, search crawlers, social scrapers, and AI summarizers can trust the metadata rather than guessing from HTML attributes alone.
Think of the JSON-LD block as a digital spec sheet for each important asset.
Why robust image metadata matters
Rich, consistent image data prevents thin experiences in several ways:
- Trustworthy previews: When an image’s purpose and licensing are clear, Google Images and Discover feel confident promoting it. Pages without this context often look hollow or spammy.
- AI and accessibility alignment: Generative answers and assistive tech need structured information to describe what an image shows. JSON-LD becomes an accessible fallback when alt text is short.
- Editorial governance: Marketing teams can audit metadata through scripts, ensuring every hero shot has a caption, credit, and license before publishing.
- Partner syndication: If affiliates or press outlets reuse your assets, structured data speeds up ingestion and reduces manual emails clarifying rights.
Even if a search feature does not require ImageObject markup, adopting it keeps your media library organized and signals that the surrounding content is comprehensive, not thin filler.
Essential properties to capture
- urlvscontentUrl:urlshould resolve to the web page that features the image with supporting text.contentUrlis the direct CDN or storage URL. Never point both at the same resource unless the image has its own standalone page.
- caption/name: Write plain-language descriptions that mention the subject, setting, and action (“Technician completing ductless heat pump install”). Aim for 110–140 characters so snippets truncate gracefully.
- widthandheight: Supply pixel dimensions as integers. Confirm they reflect the actual file, not a responsive container size. Include multiple ImageObjects if you serve different crops that matter to search.
- encodingFormat: Use MIME types (image/webp,image/jpeg). This helps downstream tools decide compression strategies.
- licenseandcreator(optional but recommended): Link to licensing terms or CC declarations, and credit photographers or illustrators. This supports Google’s image licensing badge and reduces takedowns.
- representativeOfPage: Set totruefor the primary visual so crawlers know which asset best summarizes the content.
- inLanguage: Declare when captions or text baked into the image are localized; multi-language pages may have different ImageObjects for each locale.
Capture this data in your CMS or asset manager so writers are not inventing details at publish time.
Preparing content before generating schema
- Audit hero images: Confirm each landing page has at least one 1200px+ asset that aligns with the topic. Replace stock placeholders that feel generic.
- Gather ownership details: Collect creator names, licensing terms, contracts, and expiration dates. Note whether usage is limited to specific channels.
- Write descriptive captions: Collaborate with SMEs to add context (who, what, where, why). These captions double as alt text, ImageObject caption, and social copy.
- Record technical specs: Export width, height, and file type from your design tool or CDN. If multiple versions exist, decide which is canonical for schema purposes.
- Map to other schema entities: Identify which Product, Recipe, Article, or FAQ sections reference the image so you can cross-link via imagefields elsewhere.
Documenting this information up front keeps the SwiftSchema session quick and avoids guesswork that might create thin or inaccurate metadata.
Implementation workflow inside SwiftSchema
- Choose ImageObject in the generator and confirm the metadata block reflects the page you are editing.
- Paste the canonical page urland the directcontentUrl. If the image has its own detail page (for example, a gallery entry), use that as theurl.
- Add caption,name, and optionaldescriptionto clarify context. Reference the same phrasing in the visible MDX so crawlers see consistent wording.
- Enter pixel widthandheight, plus the MIMEencodingFormat. Validate these against the actual file — mismatches are a common validator warning.
- Provide licensing details: licenseURL,creator,copyrightNotice, oracquireLicensePageif applicable.
- Set representativeOfPagetotruefor hero assets. If the image supports a specific section (like Step 3 of a HowTo), leave itfalseand mention the association in your prose.
- Export the JSON-LD, embed it once per critical image (or group them in an array), and validate using the Rich Results Test or Schema.org validator to catch typos.
Troubleshooting and QA
- Duplicate URLs: When multiple ImageObjects share the same contentUrl, dedupe or use@idreferences to avoid confusing crawlers.
- Mismatched captions: Validators may flag when the caption text never appears on the page. Ensure your MDX includes the same descriptive sentence near the image or in a figure caption.
- Small images: Assets below 800px wide rarely qualify as representative. Upgrade files before publishing rather than stretching them in CSS.
- Incorrect licensing: Double-check that the linked license actually grants rights for the depicted subject. Remove the field if you lack clear permissions — misleading licenses hurt trust.
- Missing linkage: Remember to reference the ImageObject from related schema blocks (imageproperty on Article/Product). This ties your metadata graph together and prevents orphaned nodes.
In addition to validator checks, run periodic scripts that flag images lacking captions, license URLs, or width/height values. This enforces consistency across the entire catalog.
Maintenance and reuse strategy
Hero imagery evolves with seasons, releases, or branding refreshes. Each time you swap assets, update both the visible content and ImageObject schema so
If you publish localized versions of a page, create language-specific ImageObjects with translated captions and localized license statements. For evergreen guides, schedule quarterly audits to confirm CDN URLs still resolve (migration or cache purges sometimes break older paths). Treat ImageObject upkeep as part of your thin-content defense — well-documented visuals prove the page is curated and current.
Common Errors & Fixes
- Missing or small images: use large, high‑quality assets for primary visuals.
- Confusing URLs: distinguish url(page) fromcontentUrl(file) clearly.
- No license info: link to a license when applicable to clarify reuse.
- Absent captions: describe the subject in both the MDX body and the JSON-LD.
- Representative flag misuse: only set representativeOfPagewhen the image genuinely reflects the page’s core topic.
Required properties
url
Recommended properties
contentUrlcaptionwidthheightencodingFormatlicenseinLanguagerepresentativeOfPage
{
"@context": "https://schema.org",
"@type": "ImageObject",
"url": "https://example.com/images/lemon-garlic-chicken.webp",
"contentUrl": "https://cdn.example.com/img/lemon-garlic-chicken.webp",
"caption": "Lemon garlic roasted chicken on a cast‑iron skillet",
"width": 1600,
"height": 900,
"encodingFormat": "image/webp",
"license": "https://example.com/licenses/cc-by-4.0"
}