Mehdi Saqlen
Mehdi Saqlen

Reputation: 139

How to use webp-converter (npm module) in react?

I have used webp-converter node.js module to convert image formats. I tested this with nodejs in the console. It works. But how do I use this module in react?

Upvotes: 0

Views: 664

Answers (1)

Escaper
Escaper

Reputation: 571

I just tried to use it in my React project and it turns out the module is trying to do a system call with exec() which does not work on the client-side. This leads me to believe that this module is only for usecases where the conversion would happen at the server-side. So the answer is: You can't.

Upvotes: 3

Related Questions