I have several images on a page, which all have the class
.imgToPrint
I want to loop through the list and get the file size for each using the file API.
I'm trying like this
$(".imgToPrint").each(function(){
console.log( $(this).files[0].size );
});
but I get the error Uncaught TypeError: Cannot read property '0' of undefined
how can I get the file size of each image in this class?