While this does work, I highly recommend resizing the image yourself rather than relying on the browser to resize images, for two reasons:
1) Browsers are generally really bad at it. At the very least, they're unreliable when it comes to maintaining a quality image.
2) You're wasting data transfer and increasing page load times. Why use a 2MB image that's 1000px x 800px resized for a 100x80 space when you could resize it to a 10kb image that's 100x80. (Extreme example, but I imagine you get the point.)
Just resize the image ahead of time and you'll come out with better images, smaller pages, and faster load times.