yireo / Yireo_NextGenImages

44 stars 26 forks source link

Bug: fetchpriority="high" has no effect #64

Closed Hoargarth closed 4 months ago

Hoargarth commented 1 year ago

Version: 0.4.0 Feature: Disable lazyloading with fetchpriority="high"

Expected behaviour: Adding fetchpriority="high" to an image, will prevent adding loading="lazy" to the output image

Actual behaviour: Adding fetchpriority="high" doesn't do anything

Solution: The preg_replace which adds lazyloading is done before the check for an existing fetchpriority="high". https://github.com/yireo/Yireo_NextGenImages/blob/master/view/frontend/templates/picture.phtml#L12 Line 12 should be moved ater the condition in line 19

Related issue: https://github.com/yireo/Yireo_NextGenImages/issues/52

Hoargarth commented 1 year ago

PR for this☝🏻

Jeroen-Buro210 commented 1 year ago

Hoargarth is correct, although $lazyloading is set to '', the $originalTag is already created with the loading="lazy" attribute. PR would be great

jissereitsma commented 1 year ago

Update, a fix is underway already. I hope to release things today.

jissereitsma commented 4 months ago

I'm closing this ticket, because it should already be fixed.