Skip to content

Format has no effect on Content-Type in SSG/static mode #1887

@bropa

Description

@bropa

Hi,

is it normal that the defined format of images in generated mode (SSG) has no effect on the header content-type?

In dev mode, the content-type is changed as desired to e.g. webp, with <NuxtImg format="webp" src="..." />. In generated mode, the information can be found in the file path /_ipx/f_webp&..., but the content-type corresponds to the original image (jpg). I have already tried to set default values in the nuxt.config, but have had no success.

Is this an error in our setup or a bug in NuxtImg, or is this function simply only provided in dev/build mode?

  • NuxtImg: 1.10.0
  • Node Version: v20.14.0
  • Nuxt Version: 3.17.6
  • CLI Version: 3.25.1
  • Nitro Version: 2.11.13
  • Package Manager: pnpm@10.12.4

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