How to Re-enable Infinite Scroll of Media Library in WordPress 5.8

Last updated:

In WordPress 5.8, infinite scrolling in the media library has been discontinued. Learn how to revert to infinite scrolling. You can re-enable infinite scrolling by adding code or with a plugin.

Infinite scrolling in media library removed in WordPress 5.8

WordPress 5.8 has removed infinite scrolling in the media library.

Initially, 40 items are displayed, and when you click the Load more button, the next 40 items are loaded.

Select or Upload Media

The following article provides more information about WordPress 5.8.

Why has Infinite Scrolling been removed?

Infinite scrolling has been discontinued for the following accessibility, usability, and performance reasons.

How to Re-enable Infinite Scrolling in the Media Library

There are two ways to re-enable infinite scrolling in the media library: by adding code or by installing a plugin.

Adding the code

Add the following code to your theme’s functions.php.

 add_filter( 'media_library_infinite_scrolling', '__return_true' );

Install the plugin

There is a plugin available to enable infinite scrolling in the media library.

Install and enable Media Library Enable Infinite Scrolling.

Media Library Enable Infinite Scrolling
go to top