이미지 태그에 loading=lazy 가 있을경우 viewimagereisze 함수에서 width 속성을 추가하지 않도록 수정#355
This commit is contained in:
@ -24,6 +24,9 @@
|
||||
var width = $this.width();
|
||||
|
||||
$img.each(function() {
|
||||
|
||||
if ($(this).attr("loading") === "lazy") return; // loading="lazy" 속성이 있는 경우 건너뜀
|
||||
|
||||
if($(this).data("width") == undefined)
|
||||
$(this).data("width", $(this).width());
|
||||
|
||||
@ -73,6 +76,9 @@
|
||||
var width = $this.width();
|
||||
|
||||
$img.each(function() {
|
||||
|
||||
if ($(this).attr("loading") === "lazy") return; // loading="lazy" 속성이 있는 경우 건너뜀
|
||||
|
||||
$(this).removeAttr("width")
|
||||
.removeAttr("height")
|
||||
.css("width","")
|
||||
|
||||
Reference in New Issue
Block a user