Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
752 B
Plaintext
1 line
752 B
Plaintext
{"version":3,"sources":["../../../src/uploads/image-resizing/extractHeightFromImage.ts"],"sourcesContent":["import type { Metadata as SharpMetadata } from 'sharp'\n\n/**\n * Used to extract height from images, animated or not.\n *\n * @param sharpMetadata - the sharp metadata\n * @returns the height of the image\n */\nexport function extractHeightFromImage(sharpMetadata: SharpMetadata): number {\n if (sharpMetadata?.pages) {\n return sharpMetadata.height! / sharpMetadata.pages\n }\n return sharpMetadata.height!\n}\n"],"names":["extractHeightFromImage","sharpMetadata","pages","height"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,uBAAuBC,aAA4B;IACjE,IAAIA,eAAeC,OAAO;QACxB,OAAOD,cAAcE,MAAM,GAAIF,cAAcC,KAAK;IACpD;IACA,OAAOD,cAAcE,MAAM;AAC7B"} |