You can always filter on the client side:
var query = wp.media.query();
query.filterWithIds = function(ids) {
return _(this.models.filter(function(c) { return _.contains(ids, c.id); }));
};
var res = query.filterWithIds([6,87]); // change these to your IDs
res.each(function(v){
console.log( v.toJSON() );
});
Disclaimer: found the beautiful filterWithIds
function in this SO question.
Related Posts:
- Refresh wp.media after ajax call
- Trigger JS when featured image upload window is opened in admin
- WP3.5 Media Uploader – how to make it accept multiple images?
- Switch between tabs on “Insert Media” dialog
- Trigger refresh for new media manager in 3.5
- How to add new tab to media upload manager with custom set of images?
- Extend Media Library
- How to make “Upload files”selected by default in Insert Media?
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- what happens to existing media files when I switch to year/month directory structure format?
- Reject upload of wrong-sized images using the Media Uploader
- How to show all available images in WP’s media library when using the Polylang plugin?
- How to add a custom field to the media screen (image/gallery)?
- Can’t upload media, permissions are correct
- Saving Media – Which Hook is Fired?
- Set limit to media upload?
- WordPress 3.5: Switch back to Old Media Uploader?
- upload_async.php returns 500 error
- Which filters or actions to use after a media upload and delete?
- Use a separate custom table (not posts) to handle file upload data
- Show only images and videos in a wp.media window
- Image upload callback in new 3.5 media
- retrieve custom image sizes from media uploader javascript object
- Add inline uploader to plugin option page
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- Can I use the wp media uploader for my own plugin?
- How to wp_upload_bits() to a sub-folder?
- Open media frame and select an attachment
- Add tinymce buttons to caption textarea in media uploader
- Customizing the 3.5 “Add Media” popup (Backbone.js)
- Insert images to post not working
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- Where do the favicons for Media Files come from
- WP 3.5 media manager – how to create a working gallery frame
- How to manage a standalone media folder?
- wp_generate_attachment_metadata returns empty array
- How do I link directly to uploaded files?
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- Is wp_read_audio_metadata() function deprecated?
- Settings in ‘Media > Settings’ is ignored when inserting images
- Set a maximum upload count for users on a specific user role
- I want to replace a media file (pdf) with an updated version
- There’s a way to scale media (images) at 50%?
- Multisite, upload images directly to Amazon S3
- How to get all files inserted (but not attached) to a post
- Password protect some uploaded files, so only logged-in users can view them
- wp_editor with media buttons
- How to protect uploads in multisite if user is not logged in?
- Media Uploader: get deleted files
- WordPress REST Upload Media
- using media uploader to select image of specific size, enforce cropper
- Force wordpress to see uploads folder media
- Append button to WordPress Image Details modal
- Switch to the library tab in the media uploader
- Modify the array of selected images in media modal
- How to validate the file name of the Media File Uploads?
- Disable TinyMCE Drag and Drop
- How to get the image url in the input box from media library?
- 3.5 media manager add CSS / JS to new ‘tab’ iframe content
- Add/change multipart_params parameter when uploading post image
- Media uploader not work properly [closed]
- Post Specific Uploader
- Setting wp_temp_dir and permissions not working for “Missing A Temporary Folder” error
- http error when uploading media files
- Select image sizes you want to be uploaded
- wp_temp_dir does not change the /tmp temporary default directory
- Retrieving JSON data in ajax request from media uploader
- Maximum upload size changes in php.ini ignored – How to remove upload size limit?
- How to disable WordPress Media resize different size version?
- How to change “Publish” button text for specific page
- Restrict file types in the uploader of a wp.media frame
- Saving WordPress generated thumbnails in a subdirectory
- Media upload via backend doen’t work after moving site
- Whole bunch of errors on WP website – media upload, edit slugs, edit screen not working [closed]
- Setting higher upload limit
- Media library storing files in uploads not folders within in uploads
- How to side load an image from a service
- Add select field to media uploader that adds a class to the image
- Media handle sideload not working
- Close the media-upload thickbox right after upload is finished?
- How to overwrite wp_unique_filename logic
- How to change upload directory based on frontend form input name or ID?
- How to host different file formats/types for a media attachment without creating multiple attachments?
- Retroactively place uploaded media into -month, -year based folders?
- How To install AWS SDK for PHP in wordpress?
- How to delete uploads not in media library?
- wp.media add context
- Add fields to the WordPress media uploader
- Refreshing collections in the admin media manager
- Change default from “Attachment post URL” to “File URL” in Add Media
- Why does SVG upload in Media Library fail if the file does not have an XML tag at the beginning?
- media_handle_upload : undefined function?
- Site icons with alpha channel for self-hosted WordPress blog network
- How can I receive the image id using the media box?
- wp_enqueue_media() Will not load JS on the theme
- media sideload image not working with JPG file
- Insert Image automatically when upload finishes wordpress media uploader
- How do I modify the url of uploaded media content?