serverless-nextjs / serverless-next.js

⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
MIT License
4.41k stars 449 forks source link

"jfif" files fail to render with "Image" component #2602

Closed jaandrews closed 10 months ago

jaandrews commented 10 months ago

Issue Summary

jfif file that is rendered with the nextjs Image component throws a 403 error.

Actual behavior

Image request throws a 403 error.

Expected behavior

Image renders.

Steps to reproduce

  1. Get a jfif file.
  2. Render it with the Image component from "next/image"

Screenshots/Code/Configuration/Logs

Example of the code leading to the problem I have.

<Image src="https://example.com/media/some-image.jfif" width={200} height={100} alt="Example" />

Versions

Additional context

This isn't a problem caused by the domain not being whitelisted, as I have svg and jpg files hosted on the same domain that don't encounter this issue.

jaandrews commented 10 months ago

Closing. Accidentally posted this here when it should go in the main nextjs repository.