pixelastic / norska

🏔️ Custom SSG using Pug, Webpack, PostCSS and Tailwind.
https://projects.pixelastic.com/norska/
MIT License
8 stars 0 forks source link

Check if possible to use sharp instead of image-size to get the image dimension #122

Closed pixelastic closed 3 years ago

pixelastic commented 3 years ago

I am already using sharp to create the blurry base64 version, so I might as well use it to get the image dimensions instead of pulling another dependency.

See modules/assets/lib/main.js

pixelastic commented 3 years ago

✔ Done. Calling .metadata() does return the width and height.

Also fixed an issue with jpg files having the wrong mimetype