Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5297

Remove lazy-loading custom js implementation and use html loading tag instead

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Released
    • Icon: Should have Should have
    • 2.39.1
    • 5
    • Block: Articles, Block: Carousel Header, Search
    • Sprint #144
    • deimos

      When we first implemented lazy loading using the `vanilla-lazyload` the native support in browsers for the `loading` html attribute was pretty low. Now things look better for the 3 major browsers.

      On top of that, Wordpress 5.5 (planned to be released at Aug 11) will have builtin support for `loading` with `lazy` being the default option.

      Readings

      Tasks

      • Remove custom loading code from the blocks and sections that have it (Carousel Header, Articles, Search results).
      • Add loading="lazy" to all the above cases.
      • Remove custom loading code from Image block. Don't add something custom to check if WP is adding its own loading attribute here after 5.5

            nroussos Nikos Roussos
            nroussos Nikos Roussos
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: