score:0

so i see you tagged reactjs & web if you want to do this in web (because your code is in nodejs 🤨) you can put it in an img tag like this and get width and height of that tag...

if you don't want to show it just do this in css: (dont use display: none;)

elem {
  visibillity: hidden;
} 

Related Query

More Query from same tag