Hi everyone,
I’m working on a project built with Nuxt 3 and deployed on Netlify under the site name lovely-otter-ddd08b.netlify.app
. I’ve encountered an issue with the SEO meta tags not behaving as expected, and I’m hoping someone can help.
The Problem
Initially, I noticed that my website was ignoring page-level SEO meta tags and always falling back to the default meta values set globally in nuxt.config.ts
or app.vue
using the useSeoMeta
or useSeoServerMeta
composables.
My Fix So Far
After extensive investigation through the Netlify forum and Nuxt documentation, I managed to resolve the SEO tags issue by adding the --prerender
flag to my Netlify build settings:
Build command: yarn run build --prerender
With this setting, the source code correctly includes the expected page-level meta tags, and social media previews now display the right content when sharing links.
The New Issue
However, after enabling --prerender
, external images stopped working. In my nuxt.config.ts
, I had configured external image domains as follows:
$production: {
image: {
provider: "netlify",
domains: ["external-domain.com"],
},
},
Before using --prerender
, this worked fine. But now, external images seem to be processed via Netlify’s /images
optimization service (e.g., /.netlify/images/...
), which fails when the image URL points to an external domain.
My Question
- Is there a way to disable Netlify’s image optimization (i.e., the
/.netlify/images
alias) for external images? - Alternatively, is there a method to fix SEO meta tags without relying on the
--prerender
flag?
I’d appreciate any insights or suggestions!
Thank you!