You could give Pixtulate a try (http://www.pixtulate.com). Detecting the client's properties (pixel density, screen size, etc) would still have to be done via JavaScript on the client, but then just append those properties as query parameters on the img's src attribute and the image will get converted on the fly to whatever your visitor needs. Not only do you not have to pre crop or scale your images, every image is specifically tailored to your visitor...not just a simple 1x vs 2x.