Conditional Image Loading Example

This page uses media queries and background-image to conditionally load images for different screen widths.

If you watch your network traffic while interacting with the page you'll note that only one image is downloaded initially. The second is only downloaded if the media query threshold is crossed.

There are lots of drawbacks to this approach that I won't rehash here.

If you just want to paste a chunk of markup into WordPress or something, this is pretty simple.

(view source for more info)