Stop clicking through media library pages one at a time
Media Infinite Scroll replaces the media library's pagination with automatic loading, so reaching the bottom of the grid or the list brings in the next batch on its own.
- Grid and list view each get their own independent toggle.
- Grid view drives WordPress's own native Load More mechanism.
- List view fetches and appends new rows as you scroll.
- Nothing loads until you actually scroll far enough to need it.
What does Media Infinite Scroll do?
When the media_infinite_scroll module is active, TOWP_Media_Infinite_Scroll replaces the media library's page-by-page navigation with automatic loading, and grid and list view each work through a different mechanism since WordPress itself only has native infinite scroll support for one of them. In grid view, the module enables WordPress's own media_library_infinite_scrolling filter, then watches a marker placed after the loaded attachments and auto-clicks the native "Load More" button once that marker scrolls into view. In list view, where no native mechanism exists, a marker below the table triggers a fetch of the next page, and DOMParser extracts and appends the response's rows directly onto the existing table.
Reaching the bottom of a batch shouldn't require a click
Because pagination interrupts scanning, browsing a large library ends up feeling more like a series of stops than one continuous scroll.
Pagination interrupts scanning through media
Every time a page's worth of attachments runs out, the library either stops entirely or hands over a Load More button, breaking the flow of scanning through files.
List view has no built-in way to continue automatically
WordPress added native infinite scroll support for the grid view in version 5.8, but the list/table view still relies entirely on manual pagination with no equivalent.
Two views, two working mechanisms
Because only one view has a native mechanism to build on, the module solves grid and list view differently.
Grid view, built on WordPress's own mechanism
Enables the native Load More filter WordPress added in 5.8, then automates the click so the next batch appears without any manual interaction.
List view, built from scratch
Since no native equivalent exists for the table view, a custom fetch-and-append mechanism handles it directly.
Only loads what's actually needed
Since nothing loads until a visitor scrolls far enough to reach the marker, idle scrolling never triggers unnecessary loading.
Native where possible, custom where it has to be
Every capability below is present in the supplied PHP class, its JS asset and the settings registration.
Drives WordPress's native Load More
Enables media_library_infinite_scrolling, the filter WordPress core added in 5.8, then an IntersectionObserver auto-clicks the resulting button as the marker comes into view.
The marker sits after the grid, not on the button
Placing the marker below the entire loaded grid, rather than watching the button directly, prevents an auto-click loop on short grids where the button would otherwise be visible immediately.
Fetches and appends rows directly
Since WordPress has no native infinite scroll for the list view, a fetch() call retrieves the next page and DOMParser extracts just the table rows to append.
The next-page link refreshes with each batch
The list view mechanism also swaps in the freshly returned pagination controls, so the link to the following page always stays accurate.
Grid and list, controlled separately
Enabling one view's infinite scroll has no effect on the other; an administrator can turn on each one independently based on how a site's media library actually gets used.
The observer disconnects once nothing's left
Both mechanisms detect when there's nothing further to load and disconnect their own observer, rather than continuing to watch indefinitely.
Where continuous loading helps most
The module supports any library where clicking through pages has become the bottleneck.
Media libraries with hundreds of files
Scan through a large library continuously instead of clicking to the next page every time a batch runs out.
Sites that manage media primarily in list view
Bring the same continuous-loading convenience to the table view, which WordPress itself never added native support for.
A smoother editorial workflow
Let content editors browse and select media without the interruption of manual pagination clicks.
Continuous browsing, nothing wasted
The module combines a smoother browsing experience with genuinely demand-driven loading.
On-demand loading, nothing speculative
The verified implementation only requests what scrolling actually calls for.
Requests happen only on demand
Each additional batch loads exactly once, triggered by the marker coming into view, never speculatively.
Assets load only on the media library page
The module's script and styles only enqueue on upload.php, adding no weight anywhere else in wp-admin.
A lightweight polling check between loads
The brief interval that waits for WordPress's own button to re-enable is a simple, low-cost check, not a heavy operation.
Existing pages, existing authentication
The module changes how attachments load, never who can reach them or how their authentication works.
Same-origin credentials only
The list view's fetch request explicitly uses same-origin credentials, the same authentication context as any other page request in the admin.
No new endpoints introduced
Both mechanisms request existing WordPress admin pages; the module doesn't add a new AJAX action or REST endpoint specifically for this feature.
Administrator-only configuration
Only an administrator with access to TheOneWP settings can enable grid or list infinite scroll.
Read-only browsing behaviour
The module only changes how it requests and displays additional attachments; it doesn't modify, create, or delete any media.
Built on native WordPress and standard browser APIs
The supplied code integrates through APIs present in WordPress core and modern browsers; this page makes no compatibility claim beyond the verified implementation.
media_library_infinite_scrolling
The exact filter WordPress core introduced in version 5.8 for enabling infinite scroll in the media grid.
IntersectionObserver
A standard browser API for detecting when an element scrolls into view, used to trigger both the grid and list loading logic.
fetch() and DOMParser
Standard browser APIs for requesting a page and parsing its HTML response, used together to extract and append new table rows.
TheOneWP versus common alternatives
Compare the verified Media Infinite Scroll implementation with a typical naive scroll-loading script.
| Capability | TheOneWP Media Infinite Scroll | Other common solutions |
|---|---|---|
| Grid view infinite scroll | Built on WordPress's own native mechanism | Often reimplemented separately, risking inconsistency with core |
| List view infinite scroll | A custom mechanism, since WordPress has none | Rarely addressed at all by other approaches |
| Avoiding an auto-click loop | A deliberate marker placement prevents it | A naive implementation can trigger a rapid load-everything burst |
| Loading on demand | Nothing requested until the marker is reached | Some approaches pre-load speculatively |
| Administration | Two independent toggles, nothing else to configure | Usually all-or-nothing, if offered at all |
Enable continuous browsing in four steps
Test both views separately if both get enabled, since each works through a different mechanism.
Enable Media Infinite Scroll
Activate the module from the TheOneWP Content settings tab.
Turn on the views actually used
Enable grid view, list view, or both, based on how editors actually browse the site's media library.
Scroll to the bottom of a batch
Confirm the next batch of attachments loads automatically as the bottom of the loaded content comes into view.
Check both views if both are enabled
Since grid and list view use different mechanisms, verify each one independently.
Match the toggles to how the library gets used
A quick check on a large enough library confirms everything works as expected.
Enable both views if editors use both
Different people browse grid and list view differently, so enabling both keeps the experience consistent either way.
Test on a library large enough to paginate
A library with only one page of content won't show any visible difference, so verify the behavior on a library with multiple pages.
Check custom media library integrations separately
A page builder or plugin with its own media picker may render its own markup that this module doesn't recognize.
Leave it running once verified
Since there's no further configuration once enabled, nothing more needs maintaining after initial verification.
Avoid assumptions that lead nowhere
A couple of details are easy to misjudge when first testing the module.
Assuming one toggle covers both views
Grid and list view work as independent switches; enabling one has no effect on the other.
Testing on too small a library to notice anything
With only one page's worth of content, there's no next batch to load, so the feature will appear to do nothing.
Expecting it to affect a custom media picker
The module targets WordPress's own media library screen specifically; a page builder's separate media interface isn't covered.
Media Infinite Scroll FAQ
These answers come directly from the verified class, its JS asset and the settings registration.
What does Media Infinite Scroll do?
It replaces the media library's pagination with automatic loading, so the next batch of attachments appears as you scroll instead of requiring a click.
Does this work the same way in grid and list view?
No. Grid view drives WordPress's own native Load More mechanism, while list view uses a separate fetch-and-append approach, since WordPress has no built-in infinite scroll for the table view.
Can I enable this for grid view only?
Yes. Grid view and list view work as independent toggles.
Will this load every attachment at once?
No. Each additional batch loads only when the marker at the bottom of the current content scrolls into view.
Does this affect the front end of the site?
No. The module only changes behavior on the WordPress admin media library screen.
What happens on a media library with only one page of content?
Nothing changes visibly, since there's no additional page to load in the first place.
Does this create any new AJAX or REST endpoints?
No. Both mechanisms request existing WordPress admin pages rather than introducing a new endpoint.
Will this affect a page builder's own media picker?
No. The module targets WordPress's native media library screen specifically, not a third-party interface.
Is there a risk of loading everything at once by accident?
The grid mechanism specifically guards against that by placing its marker after the loaded content, rather than on the Load More button itself.
Who can enable this module?
Only an administrator with access to the TheOneWP settings screen.
Stop clicking to the next page of media.Let the library keep loading as you scroll.
Use Media Infinite Scroll to replace pagination with automatic loading, in grid view, list view, or both.

