BBC-News/Imager.js

Markups

<div class="placeholder"
    data-src="{width}{pixel_ratio}.jpg"
    data-alt="...">
</div>
...
<script>
    new Imager('.placeholder', {
        className: 'responsive',
        onResize: true,
        lazyload: true,
        scrollDelay: 250,
        availableWidths: {
            640: 'small',
            1024: 'medium',
            1920: 'large'
        },
        availablePixelRatios: [1, 1.3, 2],
        onImagesReplaced: function (images) {
            ...;
        }
    });
</script>

Feature