webptools icon indicating copy to clipboard operation
webptools copied to clipboard

Solution to installation in docker alpine

Open njavilas opened this issue 4 years ago • 0 comments

Good morning colleagues, I publish here my code to use this library in docker alpine apk add ca-certificates ffmpeg libwebp libwebp-tools cp /usr/bin/cwebp /{appProject}/node_modules/webp-converter/b in/libwebp_linux/bin/cwebp


import * as webp from 'webp-converter';

webp.grant_permission();

export const convert = async ({ input, output }) => {
    try {
        const result = await webp.cwebp(input, output, null, "-v");

        console.log(result)

    } catch (error) {
        console.log(error)
    }
}

njavilas avatar Sep 25 '21 15:09 njavilas