Following the migration API docs, I'm doing the following :
migration.createAsset(fs.readFileSync(imagePath), 'test.webp')
The migration runs smoothly and I can see the new media in media library. However there is no preview, and I cannot use it in a ImageField :
Note that the file is not corrupted, if I download it from the media library, it is identical to my original image.
Strangely, if I host the image somewhere and do the exact same, it works fine :
migration.createAsset('https://www.example.com/test.webp', 'test.webp')
I'm not sure what's going wrong here ?
Regards,
Grégoire