Make WordPress Core

Opened 4 weeks ago

Last modified 3 weeks ago

#65850 new defect (bug)

Adjust the number of images per page loaded during infinite scroll

Reported by: joedolson Owned by:
Priority: normal Milestone: 7.2
Component: Media Version: 7.1
Severity: normal Keywords:
Cc: Focuses: accessibility, performance

Description

After infinite scroll was disabled in #50105, the count of 40 images per page was determined to be too low for efficient use of the 'Load More' control, so the per page total was changed to 80.

When infinite scroll was re-enabled in #65564, the number of images per page remained at 80, approximately doubling the number of images loaded by the media library in normal usage with infinite scrolling enabled. The actual variation is complicated, because of the mechanism used to determine how many queries to fire.

The behavior should be conditional, as the needs of infinite scroll and load more are different. This may be something that could be handled in the proposed settings dialog for the media panel in #65775

See: https://core.trac.wordpress.org/ticket/65564#comment:21 and subsequent discussion.

Change History (4)

#1 @westonruter
4 weeks ago

Per my previous comment, should all of these images get loading=lazy? They are rendered with JS anyway, so the preload scanner can't load them earlier. Otherwise, loading=lazy can be omitted from the first N images, where N is the number of images that are visible at least on every viewport.

#3 @wildworks
3 weeks ago

Is this ticket intended to be addressed in 7.1? If so, it needs to be addressed before the commit freeze scheduled for next Monday.

#4 @joedolson
3 weeks ago

  • Milestone Awaiting Review7.2

Realistically, I don't think this is going to have time to be finished and receive sufficient testing for 7.1. I'm going to milestone it for 7.2, but if we receive performance concerning reports after release, it may be a good ticket to look at for a minor release.

Note: See TracTickets for help on using tickets.