diff --git a/src/provider.ts b/src/provider.ts index 83e19b3f4..3c1fdd1ec 100644 --- a/src/provider.ts +++ b/src/provider.ts @@ -137,12 +137,13 @@ export async function resolveProvider(_nuxt: any, key: string, input: InputProvi } const resolver = createResolver(import.meta.url) + + const setup = input.setup || providerSetup[input.provider as ImageProviderName] || providerSetup[input.name as ImageProviderName] + input.provider = BuiltInProviders.includes(input.provider as ImageProviderName) ? await resolver.resolve('./runtime/providers/' + input.provider) : await resolvePath(input.provider) - const setup = input.setup || providerSetup[input.name as ImageProviderName] - return { ...input, setup,