Upgrade custom lazyload function