I have a lot of images in my website, so when I open wp-admin/upload.php the server slow down. Would be possible to display only 50 images per time?

I saw there is this similar question, but it works only for the "set featured image" popup.

I would like to apply the limit also to the upload.php window.

How can I achieve that?

Kind regards

1 Answer 1


maybe this other similar question (with a good answer) can help you. Change default screen option value for media items per page (in media library)

And the filter to use is :

function my_edit_media_per_page(){
    $media_per_page = 200; //or whatever you want
    return $media_per_page;

add_filter( 'upload_per_page', 'my_edit_media_per_page', 10, 3 );
  • I added this to function.php but it returns all the media, why?
    – sfarzoso
    Dec 17, 2021 at 10:20
  • Do you use the library in list or grid mode? Do you have any plugins installed, affecting the media library?
    – FS-GSW
    Dec 17, 2021 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.