diff --git a/src/entities/RequestHandler.ts b/src/entities/RequestHandler.ts index 4a2ae50..ecdf6c2 100644 --- a/src/entities/RequestHandler.ts +++ b/src/entities/RequestHandler.ts @@ -106,6 +106,11 @@ export class RequestHandler extends BaseRequestsHandler { else img = img.resize(Math.floor((stats.width*maxH)/stats.height), maxH); } + + // Rotate the image, if required + if(stats.orientation != undefined) { + img = img.rotate(/* use EXIF orientation header */) + } // Save image await img.png().toFile(targetSysPath);