imagekit-developer / imagekit-react

React SDK for using ImageKit.io
https://imagekit.io
MIT License
102 stars 28 forks source link

Image doesn't load if lqip active is set to false. #71

Closed pip8786 closed 2 years ago

pip8786 commented 2 years ago

<IKImage lqip={{ active: true }} {...other} /> works fine but if you do <IKImage lqip={{ active: false }} {...other} /> the image never loads. The workaround is to make an object that is undefined:

let lqip: LQIP | undefined = { active: true };
if (media.type === MediaType.Video) {
  path += "/ik-thumbnail.jpg";
  lqip = undefined;
} 
return (
<IKImage
  lqip={lqip}
  {...other}
/>
imagekitio commented 2 years ago

Fixed in version 2.0.0