View Single Post
Old 20th January 14, 12:52 PM   #2
WLC Lover
ronaldroe's Avatar
Join Date: Feb 2013
Posts: 197
Default Re: Questions on image resize

There is,but there isn't, but there will be.

There is, because if you load the image as a background or as content within a pseudo-element, you can swap it out with media queries.

There isn't a built-in way to swap out content images loaded with the <img> tag.

There will be soon, as the W3C recently made the <picture> element a recommendation, so it will be arriving in Webkit/Blink soon, and it's already arrived in FF's nightly builds.

Alternatively, you could use javascript to grab viewport width and set image sources, but that could get messy.
ronaldroe is offline   Reply With Quote