• in lieu of testing myself – thought I’d just ask — how to exclude certain classes from being lazied ?

    use case: buddypress profile image crop messed up by lazy loading

Viewing 7 replies - 1 through 7 (of 7 total)
  • the assumption seems to be excluding is not needed as it should just work. would be interesting to know if it indeed just works in your use case wasanajones ??

    edit: also see https://github.com/WordPress/wp-lazy-loading/pull/4 for background info.

    • This reply was modified 4 years, 8 months ago by Optimizing Matters. Reason: added related github PR link

    What about image tags that are used for tracking purpose? If they are not excluded but lazy loaded instead, they will not work anymore…

    Based on what I read in some of the discussions on Github for this feature plugin, Chrome loads the first 2KB of all images anyhow, which for tracking pixels should mean the image is fully downloaded anyhow even if lazyloaded.

    Just add loading="eager" to images that you want to keep with normal browser behavior

    https://github.com/WordPress/wp-lazy-loading/pull/4#issuecomment-576009944

    Thread Starter wasanajones

    (@wasanajones)

    git is closed to comments – but adding to the image is NOT always possible and this is the incorrect way to do this — other GOOD lazy loading have a class you can specify

    this “add to the image” approach might break 200,000 sites using buddypress from editing profile images…

    Plugin Author Andrew Ozz

    (@azaozz)

    use case: buddypress profile image crop messed up by lazy loading

    @wasanajones Can you confirm/reproduce this? Looking at BuddyPress trac: https://buddypress.trac.www.ads-software.com/search?q=lazy+loading, this has not been reported there.

    @agm65 Right, this is now the standard HTML way, see https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading. Class names and data-* attributes are used in some plugins that do JS based lazy-loading. They will (most likely) implement the HTML specs or become obsolete.

    git is closed to comments

    @wasanajones What and where Github is closed for comments? Seems it works properly here.

    might break 200,000 sites using buddypress from editing profile images…

    Again, there are no BuddyPress bug reports about this. Please open a new ticket there (to add loading="eager" to affected images) if you can reliably reproduce it.

    • This reply was modified 4 years, 7 months ago by Andrew Ozz.
    Thread Starter wasanajones

    (@wasanajones)

    all I know is that every lazy image loading plugin I tried they interfere with buddypress profile image editing

    I suggest you install buddypress and test it.

    there are functions.php/bp-custom.php snippets offered by buddypress devs to fix specific lazy loading plugins so it is a known issue

    to add a tag to the image – using a bp-custom.php snippet would be a pain to figure out for regular folk like me

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to exclude?’ is closed to new replies.