Yeah, came here to say the same thing – img srcset is supported everywhere, already gives you correct fallback "for free" (since you still declare a src attribute for that purpose), and provides all of the CSS query selector stuff in a much more compact, easily-parsed and easily-generated format. For example, the article's code would be captured as <img src="img_kitten.jpg" alt="Kitten" srcset="img_cat_fat.jpg 650w, img_cat_fluffy.jpg 465w">
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah, came here to say the same thing –
img srcset
is supported everywhere, already gives you correct fallback "for free" (since you still declare asrc
attribute for that purpose), and provides all of the CSS query selector stuff in a much more compact, easily-parsed and easily-generated format. For example, the article's code would be captured as<img src="img_kitten.jpg" alt="Kitten" srcset="img_cat_fat.jpg 650w, img_cat_fluffy.jpg 465w">