Sizing an image in centimetres
<p>I have an SVG image which I'd like to display on screen at exactly <code>15×15cm</code>, regardless of screen resolution, pixel density, etc.</p>

<pre><code>&lt;img src="foo.svg" class="foo"&gt;
</code></pre>

<pre class="lang-css prettyprint-override"><code>.foo {
    width: 15cm;
    height: 15cm;
}
</code></pre>

<p>This causes the image to render at <em>approximately</em> <code>15×15cm</code>, but there is quite a bit of deviation, particularly on tablet devices (my iPad rendered it at <code>8.3×8.3cm</code>).</p>

<p>I get that <code>cm</code> measurements are intended mainly for print, but is there a way to reliably replicate them on screen?</p>