// Name: WEBP to PNG // Description: Converts all selected files from .webp to .png // Author: Ricardo Gonçalves Bassete import '@johnlindquist/kit' import sharp from 'sharp' const files = await drop({ placeholder: 'Drop your images here', alwaysOnTop: true, }) files.forEach(async file => { const file_dir = path.dirname(file.path) const new_file_name = file.name.replace('webp', 'png') const new_file_path = path.resolve(file_dir, new_file_name) await sharp(file.path).toFile(new_file_path) })