nickfrosty / nuxt-seo

SEO / HTML meta tags module for NuxtJS
https://www.npmjs.com/package/nuxt-seo
MIT License
18 stars 6 forks source link

Absolute URLs for social images #9

Open nickfrosty opened 2 years ago

nickfrosty commented 2 years ago

When linking to social images, (like in the og.image or twitter.image), their should be a way to easily add the website's domain into the url.

If the image item begins with a /, then auto link append the seo.baseUrl value to it?

Going from commonly hard coded website address:

        twitter: {
                card: 'summary_large_image',
                // url: '/',
                // title: '',
                image: 'https://frostbutter.com/media/domains.jpg',
            }, 

To no hard coded address:

        twitter: {
                card: 'summary_large_image',
                // url: '/',
                // title: '',
                image: '/media/domains.jpg',
            }, 

All giving the same result: an absolute url to the desired image