Skip to content

Commit e3cde23

Browse files
authored
Auto-rotate
Use sharps feature to auto-rotate images based on their Exif date, if exist. Should make branch faucet-pipeline#20 obsolete.
1 parent 9ca09dd commit e3cde23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ async function optimizeSVG(sourcePath) {
109109
async function optimizeBitmap(sourcePath, format,
110110
{ width, height, scale, keepRatio = true }) {
111111
let image = sharp(sourcePath);
112+
113+
image.rotate(); // based on exif data
112114

113115
if(scale) {
114116
let metadata = await image.metadata();

0 commit comments

Comments
 (0)