I just noticed that Chrome resizes this image keeping its aspect ratio:
<!DOCTYPE html>
<img style="width: 100%; height: 100%;" src="image.jpg">
When the HTML5 doctype isn't there, the image is distorted:
<img style="width: 100%; height: 100%;" src="image.jpg">
This only works when the image's container is the document, it doesn't work if the image is in a div
for example.
What is this feature, and can I somehow scale the image to the full window size without removing the doctype?