for image:
<script>if(window.devicePixelRatio>1)document.getElementsByTagName("img")[0].src="retina.png"</script>
for background:
<style> @media screen and (-moz-min-device-pixel-ratio: 2), screen and (-o-min-device-pixel-ratio: 2/1), screen and (-webkit-min-device-pixel-ratio: 2), screen and (min-device-pixel-ratio: 2){ h1{background-image:url(retina.png)} } </style>
william malo Aug 02 2018-12-12T00: 00Z
source share