Get True Dimensions of an Image with JQuery

Given a list of image paths how can I iterate through them and find the actual image dimensions? I assume I have to insert them into the DOM without width or height properties and do a .width and .height on them?

Answers
var paths = ['/path/image.png', 'somewhere/page.jpg'];

$.each(paths, function(i, path) {
    var img = new Image();

    $(img).load(function() {

        var width = img.width,
            height = img.height;

        alert(width + ' × ' + height);

    });

    img.src = path;

});

See it on jsFiddle.