Added extra variable for defining if image should be resized to 50% based on height or width. Extended device pixel ration media query to include others besides webkit.