Last active
January 8, 2024 21:50
-
-
Save dabeeeenster/004e82c3e344707751f294c16d5ddf50 to your computer and use it in GitHub Desktop.
Invalid SVG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = require("url") | |
const https = require("https") | |
const sizeOf = require("image-size") | |
const imgUrl = "https://raw.githubusercontent.com/Flagsmith/flagsmith/main/docs/static/img/self-hosted-architecture.svg" | |
const options = url.parse(imgUrl) | |
https.get(options, function (response) { | |
const chunks = [] | |
response | |
.on("data", function (chunk) { | |
chunks.push(chunk) | |
}) | |
.on("end", function () { | |
const buffer = Buffer.concat(chunks) | |
console.log(sizeOf(buffer)) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment