diff --git a/src/runtime/components/nuxt-img.ts b/src/runtime/components/nuxt-img.ts index b58401e44..4d8bf0cdd 100644 --- a/src/runtime/components/nuxt-img.ts +++ b/src/runtime/components/nuxt-img.ts @@ -86,7 +86,7 @@ export default defineComponent({ }) } - if (process.env.prerender) { + if (process.server && process.env.prerender) { const sources = [ src.value, ...(sizes.value.srcset || '').split(',').map(s => s.split(' ')[0])