Решение не лучшее, за то на чистом css :)
<style>
body{ padding: 20px; }
.no-desktop{ display: none; }
@media (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 130dpi) {
.no-desktop{ display: inline-block; }
.desktop{ display: none; } }
</style>
<body>
<a href="https://uploads.scratch.mit.edu/users/avatars/1179/6794.png" class="desktop">
<img src="https://uploads.scratch.mit.edu/users/avatars/1179/6794.png" alt="google">
</a>
<a href="https://google.com" class="no-desktop">
</body>