matt-j-m / grav-plugin-aura

The Aura Plugin for Grav CMS adds meta tags and structured data to your pages for visually appealing and informative search results and social media shared links.
MIT License
26 stars 7 forks source link

og:image not present #5

Open mahish opened 4 years ago

mahish commented 4 years ago

Hi, first o fall, thank you for the plugin.

I'm having issue with a global image configuration (logo). I would expect to have it as a default og:image but no such meta tag is being generated. Am I doing something wrong? Please, see screenshots. The second one is from FB Debuggger where other image is loaded however I have not specified any image for the page. Or there is no default image? Thank you.

image image

matt-j-m commented 4 years ago

Hi @mahish Facebook will grab the image defined in the og:image meta tag. Using Aura this is set at the page level. If you do not explicitly set it there, Aura will try and use the first image from the attached Page Media (visible on the Content tab of the page editor).

The Organization logo is not used by Aura for the og:image meta tag and therefore cannot be used as a default preview image for all pages. It is instead used for Structured Data output, which is more likely to be displayed by search providers such as Google. Hope that helps.

mahish commented 4 years ago

@matt-j-m Thanks for your answer and clarification.

One more question:) How about the case when there is no page specific image at all? As I look into the code there is no fallback for such case? I would find useful to have some sort of default image as a fallback.

https://github.com/matt-j-m/grav-plugin-aura/blob/master/classes/aura.php#L122