Ryum
NuxtImage: Environment-specific IPX alias
We're using NuxtImage with the default provider (ipx) and an alias to proxy externally hosted images. We have several runtime environments, and would like this alias to resolve to different URLs depending on the environment. This is harder than it seems. We can't use environment variables due to the way Nuxt 3 works, and the module does not use runtimeConfig variables. I've tried creating custom resolvers that extend ipx, but ipx is only loaded as a server route if ipx is the provider. Any ideas?
5 replies