I am resizing an image in JavaScript based on the current viewport size. No media queries and other such things, JS all the way, and no static sizes for elements.
So basically it looks something like this:
var computedHeight = viewport.height * someRatio;
var image = goog.dom.createDom('img', {
'src': 'the.link.to.the.image',
'height': computedHeight + 'px',
'width': 'auto'
};