image
image copied to clipboard
External hosted IPX
Hi,
I want to be able to use an IPX provider, but with an IPX instance hosted on another server than the one running Nuxt.
Currently, the IPX provider source code uses the nuxt context.base
URL, and cannot be changed :
/src/runtime/providers/ipx.ts:29
url: joinURL(nuxtBase, baseURL, params, encodePath(src))
I would like to be able to change the base URL (http(s)://xxxx) of the server running the IPX instance.
Moreover, the base
property doesn't exists on ImageCTX::nuxtContext
export interface ImageCTX {
options: CreateImageOptions,
nuxtContext: {
ssrContext: any
cache?: any
isDev: boolean
isStatic: boolean
nuxtState?: any
}
$img?: $Img
}
Hosting your own IPX instance (https://github.com/unjs/ipx) means you're creating a custom provider, therefore you might need to take a look at https://image.nuxtjs.org/advanced/custom-provider
I believe that after merging ma correction, it will be possible to use the existing IPX provider, but with an external baseURL.
This is linked to #339