Is there a way to add fallback information to AMP pages?
Google Search Console is showing me an AMP warning, because my structured data doesn’t have an image tag (I’m using the default Ghost AMP template), probably because none of my posts have one.
Is there a way to add fallback information (like a fallback image, when the post doesn’t have one)?
Hey @will
You could create your own custom AMP template and provide a fallback image if the feature image isn’t set? We have complete guide here on how to create custom AMP templates: https://ghost.org/tutorials/custom-amp-themes-2/
I read that tutorial, as I understand the image is set in the json+ld script tag, which is automatically set by {{amp_ghost_head}}, is there a way to provide it myself (access the data used by {{amp_ghost_head}})?
The bast way to do this would be to check for the feature image and then optionally set the amp_ghost_head if it’s there, and then build your own custom head code if it’s not