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

SVGs are getting passed to lqip #121

Open
wbobeirne opened this issue Dec 2, 2019 · 1 comment
Open

SVGs are getting passed to lqip #121

wbobeirne opened this issue Dec 2, 2019 · 1 comment

Comments

@wbobeirne
Copy link

After adding next-optimized-images to my existing project, I got the following error:

Error: Input file is missing or of an unsupported image format lqip v2.1.0
/Users/will/Documents/project/node_modules/lqip/index.js:76
  throw up;
  ^

ReferenceError: err is not defined
    at Promise.all.then.catch.error (/Users/will/Documents/project/node_modules/lqip-loader/index.js:80:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I edited the lqip module to give more information, and found that it is getting passed an svg. My short term fix was to remove svg from the handleImages array, but ideally this loader should only include files that lqip supports.

@stevenmunro
Copy link

I'm also having trouble with this. As I use ?lqip in a custom component I build for handling images, if I have a SVG on the page the build fails. Unless of course I have a custom handler for .svg files in next.config.js. This defeats the purpose of this module if I want to also use ?sprite.

Any particular reason why svg files are being passed through lqip-loader?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants