yireo / Yireo_NextGenImages

45 stars 28 forks source link

issues/64: fix fetchpriority="high" has no effect #65

Closed Mugentoki closed 1 year ago

Mugentoki commented 1 year ago

Related to this issue: https://github.com/yireo/Yireo_NextGenImages/issues/64

It's moving up the check for fetchpriority="high" so it's coming before the preg_replace, which is adding the lazyloading tag. Fixes the functionality to disable lazyloading for specific images with fetchpriority.

jissereitsma commented 1 year ago

Sorry for not responding sooner. Since your PR, the code structure was actually changed, so that logic from the template was moved to the class instead - lazy loading is now determined in advance. This should fix your issue. Let me know if it hasn't.