Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[turbopack] The image format WebP is not supported #5347

Closed
TzviPM opened this issue Jun 21, 2023 · 7 comments
Closed

[turbopack] The image format WebP is not supported #5347

TzviPM opened this issue Jun 21, 2023 · 7 comments
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@TzviPM
Copy link

TzviPM commented Jun 21, 2023

What version of Next.js are you using Turbopack in?

Next.js v13.4.6

What package manager are you using / does the bug impact?

npm, pnpm, Yarn v1, Yarn v2/v3 (node_modules linker only)

What operating system are you using?

Mac

Describe the Bug

This bug occurs when using next dev --turbo.

I use webp for most images on tzvipm.dev. I have an import like this in my root page.tsx:

import portrait from '../public/portrait.webp';

when running next dev --turbo, and navigating to the home page, I get the following error in my terminal:

$ next dev --turbo
>>> TURBOPACK (beta)

Thank you for trying Next.js v13 with Turbopack! As a reminder,
Turbopack is currently in beta and not yet ready for production.
We appreciate your ongoing support as we work to make it ready
for everyone.

Learn more about Next.js v13 and Turbopack: https://nextjs.link/with-turbopack
Please direct feedback to: https://nextjs.link/turbopack-feedback

ready - started server on [::]:3000, url: http://localhost:3000
error - [image] public/portrait.webp
  Processing image failed
  unable to decode image data
  
  Caused by:
  - The image format WebP is not supported

warning - [parse]
  ... [3 paths] are hidden, run with --show-all to show them

In the browser, I also see an error:

Screenshot 2023-06-21 at 9 47 39 AM

Expected Behavior

Images in webp format should be incuded in the page without errors

To Reproduce

  1. In a nextjs app with app dir routing, include an image in webp format. You can use the one from my site to help debug, if you'd like: https://www.tzvipm.dev/portrait.webp
  2. Run next dev --turbo

Reproduction Repo

No response

@TzviPM TzviPM added area: turbopack kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Jun 21, 2023
@jridgewell
Copy link
Contributor

@kwonoj I believe you enabled webp for next images, right?

@kwonoj
Copy link
Contributor

kwonoj commented Jun 21, 2023

No, it is blocked by build platform support as far as I recall.

@TzviPM
Copy link
Author

TzviPM commented Jul 14, 2023

Apparently webp support landed in today’s release. I’ll test and confirm

@alexeightsix
Copy link

alexeightsix commented Jul 16, 2023

I was experiencing the same error and updated my NextJS version in my package.json to 13.4.10 and I'm no longer getting the error.

I also had this defined in my config:

...
 images: {
    formats: ['image/webp'],
...

@ryanjafari
Copy link

ryanjafari commented Jun 6, 2024

I'm using Next 15.0.0-canary.14 (turbo) and still getting this message if anyone has any ideas for me. Converted the images to png in meantime.

Edit: M3 Mac in container (aarch64) since I noticed this PR (vercel/next.js#52285) @kwonoj mentioned something about not supporting aarch64-linux-gnu...

Screenshot 2024-06-06 at 3 30 11 PM

@GiangLe1999
Copy link

Any solutions for this?

@ryanjafari
Copy link

I ended up not relying on webp, I wasn't able to get this working any other way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

8 participants