How to restore infinite scroll in the WordPress media library

Ross Hall

November 10, 2021

Screenshot of WordPress media library showing lots of photographs

WordPress 5.8 made life a little harder for those of us with large media libraries. Infinite scrolling is disabled by default, so we have to click through our images 40 at a time.

There is good news. Add the following line of code to your function.php or site plugin and infinite scrolling is restored.

add_filter( 'media_library_infinite_scrolling', '__return_true' );

I'm Ross, a digital editorial designer and content creator from the UK now living in Japan. I help growing companies plan, source, produce and promote a range of content. Find out more

Like what you read? Sign up for my weekly(ish) missive, delivered straight to your inbox.