-
Notifications
You must be signed in to change notification settings - Fork 93
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
lqip error: Input file is missing or of an unsupported image format lqip v2.1.0 #162
Comments
Same here. Referencing the path directly works, but dynamic require fails. The following works, <img
src={require(`path-to-my-image/image.png?lqip`)}
title={alt}
alt={alt}
/> And this this fails const imgSrc = 'path-to-my-image/image.png';
...
<img
src={require(`${imgSrc}?lqip`)}
title={alt}
alt={alt}
/> I get the same logs too. And just like you, |
@sebqq, I think there is a typo at that referenced line 80:16. at /Users/sebastian/../web/node_modules/lqip-loader/index.js:80:16 The path resolved from the temperate literal might be incorrect, pointing to a missing file. When importing with I forked the repo and ran the build against it, the build caught the error in my path (was using absolute instead of relative paths for the require), fixed it and it's all good. Until @zouhir, fixes it of course. 🙂 |
I have encountered the same problem. Will it get fixed soon? |
Same with me too, did anyone tried with custom webpack configuration? |
Finally found the problem. In my markdown, my cover image name was '/images/test.jp' which lqip-loader didn't support. When I changed the cover string to only 'test-jp' and updated the index page image location it worked. you can only return filename with variable not location. |
Hello. I'm not able to make lqip work with dynamic requires.
ends up with following error:
For webp-loader (or without ?lqip suffix), dynamic require works just fine.
Any suggestions please?
Thanks!
The text was updated successfully, but these errors were encountered: