This was an interesting question as I knew nothing about modifying the default behaviour of the Media Library. So, I ended up doing some research on the matter.
I found out that the Media Library uses wp_ajax_query_attachments() to get the images and other media. Inside the ajax function there’s ajax_query_attachments_args that can be used to modify the arguments for the attachment WP_Query.
After the WP_Query the ajax function uses wp_prepare_attachment_for_js (function and filter) on the queried posts before they are sent back with wp_send_json_success().
Perhaps you could try playing around with wp_prepare_attachment_for_js filter and see, if you can achieve the result you want.
Related Posts:
- Change Media Library thumbnails for non-image files to include the post title instead of the filename?
- How do you alter the default WordPress thumbnail?
- How do I select an image from Media Library in my plugin?
- Media Library plugins for better file management? [closed]
- How to add subfolders in media library for better organisation?
- How to display .ico files in the media library
- print_media_templates not applied in media manager plugin
- Uploading Images to Media Library via wp_handle_sideload() fails
- image_size_names_choose filter doesn’t show
- Add class=”media_type” when media is inserted into editor
- How do I ‘rebuild’ the WordPress Media library after transfer to new host?
- Proper way to hook wp_get_attachment_url or any other way to change that url in media library
- How can I list URLs of all audio files within my media gallery?
- Migrating to HTTPS only, most media library links need updating?
- Failing to open advanced-cache.php which is breaking Media Library
- Filter pictures in the media library [closed]
- Is there a way to delete images from the Media Library programatically?
- Is there a way to specify the tab to display when the Media Uploader is displayed?
- How to add ‘Attachment Display Settings’ in custom Media Library?
- Image width tag is less than the image pixel width – why?
- WordPress 3.5 Media Manager – Reorder Selectbox items on Media Library Tab [duplicate]
- Inserting a Download Link in the Quick Edit Actions of the Media Library?
- Media Library page super slow, loading up full quality images
- Share media among different domains
- Where is the source of the media items filter
- How to make programmatic image upload generate thumbnail and sizes?
- Adding Alt Attributes Automatically when Uploading Images to Media Library
- Getting blank thumbnails in media library?
- Media gallery thumbnails 1px
- Display latest 12 images from media library
- How to have changes made in media library to be reflected on posts/pages
- Media_handle_upload with custom upload folder?
- Remove the ‘Attachment Details’ section of the wordpress media manager
- Featured images get shrunken
- Pulling images from a subdomain
- Get image URL from media library “insert from url”
- Media Library not showing images properly
- Media Content disapeared after upgrade WP core to 3.5.1
- Clean up wp-content/upload/ folder
- The best way to protect uploaded media in WordPress?
- Media Library Grid View Custom Filter
- how to remove thumbnail and LiteSpeed Optimization column in media library list-view?
- Not able to extend wp.media.view.AttachmentsBrowser
- Custom Media Modal and uploading
- Media Library No Longer Displays Images
- Media Library SSL
- WordPress does not detect all images in uploads folder?
- the_post_thumbnail(“size”) returns same image for all sizes except thumbnail
- Media Library, hook on delete user action
- Create a User Role with permissions to only upload files to the media library?
- Media library disallows spammy filenames?
- High CPU load when loading images in media library
- Conditional tag to determine if the user is viewing the Add Media (after clicking Add media button)
- Add media button always inserts media on the next wp_editor instance when created dynamically
- How can I delete duplicate `*-1.jpg` images?
- Images are displaying as blank images
- Is it possible to share WordPress media files among different domains?
- Rebuild thumbnails via WP Cli – how?
- Is it Helpful to transfer all media library to another host? [closed]
- How to manage a music library in wordpress
- Media library on another server?
- How to edit a deleted image gallery?
- WordPress lowers image quality
- WordPress ACF delete image from media library
- image not found in media library
- Cannot upload featured image to a custom post type
- Windows Live Writer inconsistent with Media Library
- Is there a way to programmatically pass a category to the Media Library selector?
- WordPress Media Import, images not in Media Library
- Want to sell images online on wordpress but slow image loading issues
- images inside wp-content/ uploads/ are not showing up in my media library and uploaded using FTP protocol
- add_image_size() in custom theme is not generating and saving any thumbnail
- Update WP Media Library image unattended
- Uploads folder only showing files up to the letter “P”
- How to display the date a directory folder on ftp was modified
- Moving wp from a server to another, with different administrator
- How to access media library?
- Multiple thumbnails and one gallery
- how to setup user access media library?
- Get filenames of available image sizes
- Create gallery doesn’t show uploaded images
- WordPress 3.5 Media Manager – Change loaded image Size [duplicate]
- Change the default-view of Media Library in 3.5?
- How use Videos from another directory?
- bulk deleting empty items in the media library
- Media Manager 3.5 custom options
- Thumbnails for media Library images
- Remove (Unattached) Attach from “Uploaded to” in Media Library
- Uploading pictures to the Media Library: “Specified file failed upload test.”
- Pictures won’t display in media library and also won’t show preview when selected
- All the Images in Media Library is showing broken links
- Create media library feed
- Store images and videos category wise and fetch them in json format
- media library contains corrupt doubles
- Media Library shows default image instead of image preview
- Block non logged in users from accessing the media library
- Remove Edit Attachment Button in WordPress Mediathek -> see Screenshot
- How can I add custom sizes for PDF thumbnails generation?
- Unable to upload media files: Maximum upload file size: 0 B [closed]
- Why are PDF thumbnails over-saturated?