So, let's say this is the URL: www.adomainname.com/image.jpg
So, in this example (the 1400 px by 1400 px), the image is to be resized to 600 px x 600 px.
For an image that's 300 px x 500 px, it should remain as such.
For an image that's 400 px x 700 px, it should be resized to 400 / (700 / 600) px by 600 px, which is approximately 343 px x 600 px.
I have looked a bit into this and I see things being mentioned about the image being loaded first completely on the screen, or about using server side language like PHP, and so on, but like I said, keep in mind that this is for eBay, and so I am limited.
Note: The part that I am most interested in is in being able to detect the size / dimensions of the image.
You can detect an "img" elements height and width using its HTML DOM properties "height: and "width". I recommend that you retrieve those attributes asynchronously using the event attribute "onload". e.g.
<img src="image source" onload="alert(this.height + "," + this.width);" />