next-export-optimize-images icon indicating copy to clipboard operation
next-export-optimize-images copied to clipboard

SVG is not a valid image file error with inline @svgr/webpack

Open huskyjp opened this issue 1 year ago • 2 comments

Describe the bug SVG is not a valid image file error with inline using @svgr/webpack. Here is the error message

Error: Image import "@svg/Android.svg" is not a valid image file. The image may be corrupted or an unsupported format.

Should have fixed here https://github.com/dc7290/next-export-optimize-images/pull/658 but maybe happening again with the current next version?

Expected behavior Should treat SVG as same as other formats

Desktop (please complete the following information):

  • OS: macOS
  • Browser: chrome

Package versions

  • "next-export-optimize-images": "^3.2.0"
  • "next": "^14.0.4"

huskyjp avatar Dec 28 '23 04:12 huskyjp

@huskyjp did you find a solution for this?

sven-ra avatar Feb 15 '24 10:02 sven-ra

Do you have next.config.js to share?

The behaviour depends on the webpack extension settings.

dc7290 avatar Apr 11 '24 18:04 dc7290