Skip to content

TypeScript error on useImage provider option with v2.0.0 #2036

@fredericDelaporte

Description

@fredericDelaporte

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions