image icon indicating copy to clipboard operation
image copied to clipboard

TypeScript error on useImage provider option with v2.0.0

Open fredericDelaporte opened this issue 1 month ago • 0 comments

The TypeScript definition of the function yielded by useImage has changed and now causes typing errors when willing to use its provider option.

That option was typed as string, but is now typed as only 'ipx'.

The ImageOptions seems to have been changed for listing the configured providers there. But for some reason, that does not work in my project.

I have not found something about this in the migration guide. (By the way, the link to this guide in the release note is broken.)

What am I missing?

image config in nuxt.config:

  image: {
    strapi: {
      baseURL: process.env.NUXT_PUBLIC_CMS_BASE_URL
    },
    cloudflare: {
      baseURL: process.env.NUXT_PUBLIC_ASSETS_BASE_URL
    }
  }

Nuxt version 3.16.2. previous nuxt/image version 1.11.0.

Image

fredericDelaporte avatar Nov 19 '25 20:11 fredericDelaporte