Search
Other Modals questions
Forum

loading="lazy" does not work anymore

Dirk67's Avatar Dirk67
using 12.4.0 PRO (J4):
instead of loading="lazy" (attribute to the img-tag)
the plugin generates loading="1" within the html of the page ...

( docs4.regularlabs.com/modals/getting-sta...media-media-settings )
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
still does not work with "12.4.1-dev2718879 PRO" ... (did you test it ?)
- when switching off the feature in the backend it is applied loading="0" to the img tag
- when switching on the feature in the backend it is applied loading="1" to the img tag

both attributes that are non existent within the html standard

in \plg_system_modals\src\Image.php
you call:
->setLazyLoading($this->settings->{'image-lazy-loading'} ?? false)
and in \pkg_regularlabs\packages\lib_regularlabs\src\Image.php
the function is definded as:
public function setLazyLoading($enabled)
    {
        return $this->setTagAttribute('loading', $enabled);
    }
IMHO if you pass only true/false or 1/0 to this function,
this would explain this faulty behaviour
Peter van Westen's Avatar Peter van Westen ADMIN
Sorry, forgot to push the changes.
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Dirk67's Avatar Dirk67
yes,
it works with v12.4.1-dev2719369 pro
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great 🙂
The fix will be included in the next release.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription