Closed byronigoe closed 2 years ago
@clau007 If you want to use this before it's merged, you can do so like this (from your project root):
cd ..
git clone -b invalid-image --single-branch https://github.com/byronigoe/ngx-image-compress.git
cd ngx-image-compress
npm install
ng build ngx-image-compress
cd dist/ngx-image-compress
sudo npm link
cd ../../../<your_project>
npm link ngx-image-compress
I'm merging it right now.
Thank a lot @byronigoe nice find
@byronigoe Sorry to not merge this directly as is. There was a lot of conflict after the last refactoring.
Define the onerror event handler and reject the promise. This could happen if the image is invalid.
Fixes #60