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.
The following article provides more information about WordPress 5.8.
WordPress 5.8 What’s New? New Features and Changes
Why has Infinite Scrolling been removed?
Infinite scrolling has been discontinued for the following accessibility, usability, and performance reasons.
- Difficult to access with keyboard
- No audio feedback
- Possibility of corrupting browser history
- No JavaScript fallback
- May increase memory usage
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.