forked from tjanczuk/iisnode
-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Description:
I have encountered an issue where configuring the MIME type for .webp images at the global IIS level doesn't seem to apply when my application is running via iisnode. However, adding the MIME type configuration to the project's web.config file solves the problem.
Steps to Reproduce:
- Add
.webpMIME type at the IIS server level. - Deploy a Next.js application using iisnode.
- Try to access a
.webpimage through the browser.
Expected Behavior:
IIS should serve .webp images correctly based on the global MIME type configuration.
Actual Behavior:
IIS does not serve .webp images unless the MIME type is specified in the project's web.config file.
Workaround:
The issue can be resolved by adding the following to the web.config file within the project:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".webp" mimeType="image/webp" />
</staticContent>
</system.webServer>Environment:
IIS version: 10.0.20348.1
iisnode version: 0.2.21
Next.js version: 13.5.6
Operating System: Windows Server 2022 Standard v10.0.20348 Build 20348
Metadata
Metadata
Assignees
Labels
No labels