Skip to content

IPX returns a '403: Fetch error' during static generation for image urls containing special characters #815

@arthurmchr

Description

@arthurmchr

nuxt: 3.4.0
@nuxt/image-edge: 1.0.0-28020728.5df24eb

In my nuxt.config.ts I have :

modules: ['@nuxt/image-edge'],
image: {
  domains: ['cdn.discordapp.com'],
}

In my app.vue file I only have the following :

<template>
  <div>
    <nuxt-img src="https://cdn.discordapp.com/my-image.png?test=ok"
    />
  </div>
</template>

It works well in development.

But when I execute the npm run generate command to export a static version of my site, during the prerendering, I get

[nitro 11:52:32]   ├─ /_ipx/_/https://cdn.discordapp.com/my-image.png%3Ftest=ok (205ms) (Error: [403] IPX: Fetch error)

The error appears because of the replacement of the ? character in my URL by %3F.
I will get the same error for all file with a (SPACE) character in the name, or special characters in it.
I got the same result on other domain too (not only cdn.discordapp.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions