-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preload
meta link
#105
Comments
I have an eager loaded banner image component at the top of my pages that I use to set the og image and add preload meta. head() {
return {
meta: [
{
hid: 'og:image',
property: 'og:image',
content: `${this.$config.BASE_URL}${this.$img(this.src, {
width: 1200,
height: 630,
})}`,
},
{
hid: 'og:image:width',
property: 'og:image:width',
content: 1200,
},
{
hid: 'og:image:height',
property: 'og:image:height',
content: 630,
},
],
link: [
{
rel: 'preload',
as: 'image',
href: `${this.$config.BASE_URL}${this.$img(this.src, {
width: 1200,
height: 630,
})}`,
imagesrcset: this._srcset.srcset,
imagesizes: this._srcset.size,
},
],
};
}, |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Supporting the
preload
attribute to add apreload
meta link sounds like an interesting idea to improved page performance.We should have answers to these questions:
preload
meta on a page?preload
meta onnuxt-img
?The text was updated successfully, but these errors were encountered: