Get the image width and height of an image file at a remote URL in Javascript

Here's how you can get the image width and height of an image file at a remote URL. This will return an a multi-element associative array containing values under "width" and "height" as its keys.