Review main Merged

63317[FEATURE] Add native browser lazy loading for images

Benni Mack CR +2 V +2 Easy +49 −1 updated 02/20/20, 14:02

Commit message

This change adds the browser-native lazy loading option "loading"
HTML attribute for images.

See https://addyosmani.com/blog/lazy-loading/ for more details.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Christian Eßl +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Christian Eßl +1
    • TYPO3com +1 CI

Issues 1

Files 6

Review log 1319

  1. Benni Mack uploaded patch set 1 02/18/20, 21:51

  2. Benni Mack uploaded patch set 2 02/18/20, 21:56

  3. Benni Mack updated the commit message in patch set 3 02/18/20, 21:58

  4. TYPO3com voted on patch set 1 V +1 02/18/20, 22:11 Completed build in 17m 04s on Tue, 18 Feb, 10:11 PM Test Summary: 71343 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-275

  5. TYPO3com voted on patch set 2 V -1 02/18/20, 22:18 Completed build in 16m 23s on Tue, 18 Feb, 10:18 PM Test Summary: 1 of 71800 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-276

  6. TYPO3com voted on patch set 3 V +1 02/18/20, 22:24 Completed build in 22m 33s on Tue, 18 Feb, 10:24 PM Test Summary: 71344 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-277

  7. Benni Mack uploaded patch set 4 02/18/20, 22:47

  8. Kevin Appelt commented on patch set 4 02/18/20, 23:07

    Great feature - just two little questions.

    ImageViewHelper.php:117

    Do we want/need to set a default here?

    MediaViewHelper.php:161

    Should we check if it is any of the three allowed (auto, lazy or eager) values?
  9. TYPO3com voted on patch set 4 V +1 02/18/20, 23:19 Completed build in 16m 51s on Tue, 18 Feb, 11:19 PM Test Summary: 71343 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-283

  10. Georg Ringer commented on patch set 4 CR -1 02/19/20, 04:10

    We should rename all occurrences of image with media as it can also be used for iframes.
  11. Benni Mack commented on patch set 4 02/19/20, 08:37

    > Patch Set 4: Code-Review-1 > > We should rename all occurrences of image with media as it can also be used for iframes. I did this in the beginning but then figured out that TYPO3 Core has *no* built-in way to add this to iframes at all. We don't have a CType "iframe" or such. We also don't ship "img" in the RTE which is why I didn't modify lib.parseFunc. This would all be up for the authors to use "iframe" to either use a different custom / default value.

    ImageViewHelper.php:117 Reply Unresolved

    default is "null" = autoloading is not rendered, only if you explicitly set this option. If you e.g. build custom content elements for a slider, it should be up to the integrator to decide the lazy loading, and defined as "lazy" by default. Setting a default value here would also modify all occurrences in the TYPO3 Backend to use "loading=lazy" (or any other default) to be set, even though this might not make sense in that use case

    MediaViewHelper.php:161 Reply Unresolved

    yeah, makes sense
  12. Georg Ringer voted on patch set 4 V +1 CR +1 02/19/20, 13:12

  13. Benni Mack commented on patch set 5 02/19/20, 21:58

    Published edit on patch set 4.
  14. TYPO3com voted on patch set 5 V -1 02/19/20, 22:12 Completed build in 13m 28s on Wed, 19 Feb, 10:12 PM Test Summary: 71463 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-330

  15. Georg Ringer voted on patch set 5 V +1 CR +1 02/20/20, 05:00

  16. Christian Eßl voted on patch set 5 V +1 CR +1 02/20/20, 06:28

  17. TYPO3com voted on patch set 5 V +1 02/20/20, 13:40 Completed build in 11h 50m 57s on Thu, 20 Feb, 01:40 PM Test Summary: 71463 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-330

  18. Benni Mack voted on patch set 5 V +2 CR +2 02/20/20, 14:02

  19. Benni Mack merged patch set 6 02/20/20, 14:02