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

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

    XporterXMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Should have
    • Resolution: Released
    • Affects Version/s: None
    • Fix Version/s: 2.39.1
    • Labels:
    • Story Points:
      5
    • Sprint:
      Sprint #144
    • Section:
      Block: Articles, Block: Carousel Header, Search
    • Track:
      Development
    • Epic Link:
    • P4 Test Environment:
      deimos
    • Repositories:
      planet4-master-theme, planet4-plugin-gutenberg-blocks

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: