nuxt-seo icon indicating copy to clipboard operation
nuxt-seo copied to clipboard

Absolute URLs for social images

Open nickfrosty opened this issue 2 years ago • 0 comments

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

nickfrosty avatar Jan 14 '22 22:01 nickfrosty