Tutaj masz skrypt oraz pełną instrukcję:

https://github.com/ressio/lazy-load-xt