Issue on Schema markup - Fixed. Can someone commit to repo?

/var/www/ghost/current/core/server/data/meta/schema.js

has a mistake, to reproduce issue, take any article and run through Google’s structure data testing tool. Image is incorrectly coded.

Currenty:
schema = {
@context’: ‘https://schema.org’,
@type’: ‘Article’,
publisher: {
@type’: ‘Organization’,
name: escapeExpression(metaData.blog.title),
logo: schemaImageObject(metaData.blog.logo) || null
},

Should be:
schema = {
@context’: ‘https://schema.org’,
@type’: ‘Article’,
publisher: {
@type’: ‘Organization’,
name: escapeExpression(metaData.blog.title),
‘logo’: {
@type’: ‘ImageObject’,
url: schemaImageObject(metaData.blog.logo) || null
},

I fixed it locally, and validates fine now

Hey there!

This is desired behaviour. Let me explain why: Google is very specific for their logo requirements and will complain when they are not 60px*600px, or when they are an svg. As soon as your publication logo fits into the requirement, the image will be listed as ImageObject incl. its dimension.

There is an open issue for that, where you can read a bit more about it: AMP Structured Data errors for `publisher.logo` and `article.image` · Issue #7558 · TryGhost/Ghost · GitHub

I hope this helps :hugs:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.