Skip to content

Instantly share code, notes, and snippets.

@dabeeeenster
Last active January 8, 2024 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabeeeenster/004e82c3e344707751f294c16d5ddf50 to your computer and use it in GitHub Desktop.
Save dabeeeenster/004e82c3e344707751f294c16d5ddf50 to your computer and use it in GitHub Desktop.
Invalid SVG
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