WordPress media library experience

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.
Media Library BrowsingMedia Infinite Scroll
Grid viewEnable infinite scroll in the Media Library grid view.
List viewEnable infinite scroll in the Media Library list view.
Loading…
No more pagination clicksThe next batch loads automatically as you scroll.
Active
Quick answer

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.

The "click again for the next page" problem

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.

A dedicated WordPress solution

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.

Verified feature set

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.

Anti-loop safeguard

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.

Deliberate placementNo auto-click loop
List view

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.

fetch()DOMParser
Pagination stays correct

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.

tablenav-pages refreshAlways accurate
Independent toggles

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.

Two checkboxesIndependent control
Stops automatically when done

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.

Auto-disconnectNo wasted observation
Practical use cases

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.

Operational benefits

Continuous browsing, nothing wasted

The module combines a smoother browsing experience with genuinely demand-driven loading.

No repeated clickingReaching the end of a batch continues the browsing experience automatically instead of requiring another click.
Nothing loads before it's neededThe marker-based approach means idle time on a page never triggers a load that scrolling didn't actually request.
Built on WordPress's own mechanism where one existsGrid view reuses WordPress's native Load More system rather than replacing it with something separate.
Engineered against a real edge caseThe anti-loop safeguard specifically prevents a short grid from auto-loading everything at once in a rapid, unintended burst.
Performance behaviour

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.

Security implementation

Existing pages, existing authentication

The module changes how attachments load, never who can reach them or how their authentication works.

01

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.

02

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.

03

Administrator-only configuration

Only an administrator with access to TheOneWP settings can enable grid or list infinite scroll.

04

Read-only browsing behaviour

The module only changes how it requests and displays additional attachments; it doesn't modify, create, or delete any media.

Verified compatibility

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.

Native grid mechanism

media_library_infinite_scrolling

The exact filter WordPress core introduced in version 5.8 for enabling infinite scroll in the media grid.

media_library_infinite_scrollingWordPress 5.8+
Browser observation API

IntersectionObserver

A standard browser API for detecting when an element scrolls into view, used to trigger both the grid and list loading logic.

IntersectionObserverNative browser API
List view parsing

fetch() and DOMParser

Standard browser APIs for requesting a page and parsing its HTML response, used together to extract and append new table rows.

fetch()DOMParser
Solution comparison

TheOneWP versus common alternatives

Compare the verified Media Infinite Scroll implementation with a typical naive scroll-loading script.

CapabilityTheOneWP Media Infinite ScrollOther common solutions
Grid view infinite scroll Built on WordPress's own native mechanismOften reimplemented separately, risking inconsistency with core
List view infinite scroll A custom mechanism, since WordPress has noneRarely addressed at all by other approaches
Avoiding an auto-click loop A deliberate marker placement prevents itA naive implementation can trigger a rapid load-everything burst
Loading on demand Nothing requested until the marker is reachedSome approaches pre-load speculatively
Administration Two independent toggles, nothing else to configureUsually all-or-nothing, if offered at all
Recommended workflow

Enable continuous browsing in four steps

Test both views separately if both get enabled, since each works through a different mechanism.

01

Enable Media Infinite Scroll

Activate the module from the TheOneWP Content settings tab.

02

Turn on the views actually used

Enable grid view, list view, or both, based on how editors actually browse the site's media library.

03

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.

04

Check both views if both are enabled

Since grid and list view use different mechanisms, verify each one independently.

Best practices

Match the toggles to how the library gets used

A quick check on a large enough library confirms everything works as expected.

01

Enable both views if editors use both

Different people browse grid and list view differently, so enabling both keeps the experience consistent either way.

02

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.

03

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.

04

Leave it running once verified

Since there's no further configuration once enabled, nothing more needs maintaining after initial verification.

Common mistakes

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.

Frequently asked questions

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.