bobdenotter / seo

Bolt SEO extension
https://bobdenotter.github.io/seo/
MIT License
49 stars 34 forks source link

[BUG] invalid OG image tag when no image is present #66

Closed ankedsgn closed 6 years ago

ankedsgn commented 6 years ago

Ohai!

When a contenttype contains no images at all, the extension prints <meta property="og:image" content="http://nameofdomain.com/files/&quot;&quot;" />

Preferably, it should not print an image tag at all (ignoring for now that FB kinda requires a image tag, but that's another issue).

Thx!

SEO extension version 1.0.7

GwendolenLynch commented 6 years ago

Quoth http://ogp.me

The four required properties for every page are:

  • og:title - The title of your object as it should appear within the graph, e.g., "The Rock".
  • og:type - The type of your object, e.g., "video.movie". Depending on the type you specify, other properties may also be required.
  • og:image - An image URL which should represent your object within the graph.
  • og:url - The canonical URL of your object that will be used as its permanent ID in the graph, e.g., "http://www.imdb.com/title/tt0117500/".
ankedsgn commented 6 years ago

@GawainLynch Exactly. I already created another issue (#67 ) with a feature request to include a default, at @bobdenotter 's request. :)

GwendolenLynch commented 6 years ago

Yeah, saw that one come through after … Not sure how we missed it here, I've had that in my OG extension since day 1 (early 2.0-dev)

ankedsgn commented 6 years ago

Well, in 99% of the pages there is an image present. I just built a site that had a contenttype without any media. :)