How to use in Angular & Ionic
Closed this issue · 4 comments
Thank you for your contribution.
I currently need to use your component in my Angular & Ionic application to transform * .png images to * .webp. The problem is that I cannot install it because it is not compatible. I'm something new in this, but since your library doesn't have the types, that's why it doesn't recognize it.
I appreciate any help.
What exactly do you mean by "having types"? Do you mean TypeScript?
Anyway, JS generally doesn't have types.
So, unless you're trying to compile it to something else, having types couldn't possibly be a requirement.
You should also keep in mind that node-webp
is meant for back-end.
So, it won't work in any environment other than node.js.
In other words, regardless of which library of framework you're using, it should be possible to use node-webp
on your node.js back-end. You definitely don't need types for that.
But it won't work in any other environment, whether it will have types or not.
Yes, I was referring to "Typescript." I want to install it in Angular and I wanted to know if it could, but you are already telling me that it only works in BackEnd, it means that if I want it to work in my browser only with my website made in Angular, it will not work.
That being the case, I appreciate the response.
Sadly, you can't use node-webp
in a browser environment.
You may consider moving image processing to your back-end.
Otherwise you'll have to find a pure JS image processing solution.
jimp is the only image manipulation library with browser support I know, but it doesn't work with webp.
Anyway, I hope you'll find a suitable solution for your problem.