You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When static sites are generated, the configuration of the ipx provider is not used when building the site with SSG. This can cause different results and confusion between development and production using a nitro preset of static e.g. cloudflare_pages_static.
Using a static preset sets the provider to ipxStatic:
While this can be resolved by using duplicating the Nuxt configuration for the ipx provider into an ipxStatic provider, this may not be obvious to users.
When static sites are generated, the configuration of the
ipx
provider is not used when building the site with SSG. This can cause different results and confusion between development and production using a nitro preset of static e.g.cloudflare_pages_static
.Using a static preset sets the provider to
ipxStatic
:image/src/module.ts
Lines 138 to 139 in 5e90a19
Therefore, the preset configuration of
ipx
is not applied here:image/src/ipx.ts
Lines 39 to 54 in cef2f82
Example
Using the Nuxt config of:
Using SSG at build time results in
providerOptions.options = {}
as noipxStatic
preset options exist in the abovenuxt.config.ts
for:image/src/ipx.ts
Line 52 in cef2f82
While this can be resolved by using duplicating the Nuxt configuration for the
ipx
provider into anipxStatic
provider, this may not be obvious to users.Suggested Solutions
One
Remove the
ipxStatic
preset and update the logic to signal that the build is static another way.Two
Update the preset logic on
ipxStatic
to first import theipx
preset options and runtime options then override with anyipxStatic
options.Three
Update https://image.nuxt.com/advanced/static-images to warn that the
ipxStatic
preset is not the same asipx
and that theipxStatic
preset options should be set to mirroripx
.Four
Warn at build time that the
ipxStatic
preset is being used instead ofipx
and that theipxStatic
preset options should be set to mirroripx
.The text was updated successfully, but these errors were encountered: