SyntaxFix
Write A Post
Hire A Developer
Questions
Another solution is to use:
<img srcset="example.png 2x">
It won't validate because the src attribute is required, but it works (except on any version of IE because srcset is not supported).
src
srcset