I am trying to generate a thumbnail from a few original images. To achieve that, I'm using this package: sharp. Everytime I try to do that, the created thumbnails are getting rotated automatically.
This is the piece of code to generate thumbnails:
const thumbnailBuffer = await sharp(fileBuffer).resize(thumbnailWidth).toBuffer();
I am not sure if it's the thumbnailWidth that's affecting the process. Any help will be greatly appreciated. Thanks in advance!