+function convertWebPToJPG (path: string, destination: string): Promise<void> {
+ return new Promise<void>(async (res, rej) => {
+ try {
+ const command = ffmpeg(path).output(destination)
+
+ command.on('error', (err, stdout, stderr) => {
+ logger.error('Error in ffmpeg webp convert process.', { stdout, stderr })
+ return rej(err)
+ })
+ .on('end', () => res())
+ .run()
+ } catch (err) {
+ return rej(err)
+ }
+ })
+}
+