SoFunction
Updated on 2025-04-03

js function code to get image size


function getImageSize(imageEl) {
var i = new Image(); //Create a new image object
= ; // Assign the src attribute of the image to the src of the newly created image object
return new Array(, ); //Return the length and width pixels of the picture
//return [, ];
}