Skip to content

Cache folder isn't created when using (Image Component) + SVG images #19100

@StarpTech

Description

@StarpTech

Bug report

Describe the bug

According to https://nextjs.org/docs/basic-features/image-optimization#caching Next.js populates a cache dir when using the new <Image /> component. This is not the case when using SVG files. This results in a performance penalty.

To Reproduce

  1. Use the new <Image /> component in combination with an SVG image.
  2. Build for production npm run build
  3. Start your app npm start
  4. Visit the page
  5. Check <distDir>/cache/images
  6. No files have been generated!

Expected behavior

I'd expect to see the generated files in the cache directory. Even when the files can't be optimized the files should be served from the filesystem on subsequent calls.

System information

  • OS: Ubuntu
  • Browser (if applies) chrome
  • Version of Next.js: 10.0.1
  • Version of Node.js: 12.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions