This version is old school.
Please find jQuery plugins on npm.
jQuery Respify
Respify responsive image library. A simple responsive images library, which parses a image from a set of child span nodes with data-media and data-src attributes. It uses media queries to select images.