diff --git a/ignite-html-lazyload.js b/ignite-html-lazyload.js
index 18241e0..fddce56 100644
--- a/ignite-html-lazyload.js
+++ b/ignite-html-lazyload.js
@@ -28,11 +28,11 @@ IgniteTemplate.prototype.lazy = function (placeholder = null) {
//Add an intersect event to this template.
this.onIntersect(() => {
- //Move the original source into the attribute.
- this._attributes["src"] = this._lazy_src;
-
- //Modify the attribute on the element directly.
- this.element.setAttribute("src", this._lazy_src);
+ if (this._lazy_src) {
+ this._attributes["src"] = this._lazy_src;
+ this.element.setAttribute("src", this._lazy_src);
+ this._lazy_src = null;
+ }
});
}