question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some static images missing from build in 13.0.7

See original GitHub issue

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

next 13.0.7
react 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

Image optimization (next/image, next/legacy/image)

Link to the code that reproduces this issue

/

To Reproduce

  • update to 13.0.7
  • yarn build
  • yarn start

Partial next.config.js, if relevant:

swcMinify: false,
images: {
    minimumCacheTTL: 3 * 30 * day,
    formats: ["image/avif", "image/webp"],
}

Describe the Bug

Some static images return 404 and are missing from the build folder.

The exact same code works properly in 13.0.6

Expected Behavior

Images are present.

Which browser are you using? (if relevant)

/

How are you deploying your application? (if relevant)

next start

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
helioxycommented, Dec 27, 2022

you are right. images load with ssr: true

0reactions
martinnabhancommented, Dec 27, 2022

Hello everyone.

I’m currently debugging this issue and in my case it turns out images imported in client only dynamically imported components using next/dynamic (i.e. dynamic(() => import('..'), { ssr: false })) aren’t getting emitted into .next/static/media. I’ve found out why and am currently preparing a pull request to fix the issue.

Is everyone here also using next/dynamic with ssr: false? If you are I’ll mark my pull request as fixing this issue! If not, if you could please provide a reproduction I’ll take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Image import ... is not a valid image file. The ... - GitHub
I'm trying to use a static image import, and it fails with the message, Error: Image import "../public/static/lake.jpg" is not a valid image...
Read more >
Default install of NextJS 13 (13.0.7) "app" method doesn't work
I'm trying to create a brand new project using NextJS 13 to try out the new "app" folder approach. I use the following...
Read more >
WYSIWYG editor - Images weren't loaded correctly in ...
The title of the file selection dialog was not displayed correctly due to a missing resource string, for example when selecting the file...
Read more >
SMS:Bugfixes SMS - XMS Wiki
13643 Floodway materials polygons are not generated properly and some polygons are missing. Project Explorer. 13607 When opening large projects, the Project ...
Read more >
7 Reasons Why Images Are Not Loading on Your Website
Upload those images, refresh your web page, and it should immediately display the files as expected. You can also try to delete the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found