gatsby-seo-example
gatsby-seo-example copied to clipboard
Default image for SEO if null
If this
const metaImage = image && image.src ? `${data.site.siteMetadata.siteUrl}${image.src}` : null`
works on single post, how do I, if I may ask, set a default image if image is not specified on the template?
If this
const metaImage = image && image.src ? `${data.site.siteMetadata.siteUrl}${image.src}` : null`works on single post, how do I, if I may ask, set a default image if image is not specified on the template?
Couldn't you just import a default image as an asset and instead of returning null you return that image?