I found this answer, it can be done like this:
const state = this.state();
const selection = state.get( 'selection' );
selection.add({ url: 'http://www2.cnrs.fr/sites/communique/image/mona_unvarnish_web_image.jpg' });
Where this is an instance of wp.media.view.MediaFrame.Select
Hope it helps someone!
Related Posts:
- Hook into backbone to add js to wp-admin -> media library?
- How to hook in and modify the new revisions UI (3.6+)?
- sortable custom column in media library
- How to get the post editor and media library to respect HTTPS administration mode?
- Wp3.5 Media Gallery Edit modal: change captions to title
- Can initial focus be set to search field in WordPress Media Library?
- Looking for a hook to add attachment information to the media library tab
- Adding fields to the media uploader with jquery listeners
- Image editing: “Edit Original” and “Replace” buttons missing on old posts
- Edit single attachment on click (WP-admin)
- How To Reset Ownership And Permissions of Wp-Content Folder, In Order to Fix HTTP Error When Uploading Images to WordPress Media Library
- Why is unfiltered_upload not working despite being enabled?
- Minimum version for WordPress Backbone
- Am I able to change the name of /wp-admin/options-general.php?
- Insert HTML markup to page content from the Media Frame modal
- How to make Media Library use HTTPS?
- WordPress Media Uploader : How to add custom button on featured image tab
- Organising and display thousands of photos in media library
- Get URL of current featured image with JS in edit post view
- How to Filter in the “Add Media Popup” to show only “unattached” Media
- Images on admin backend not showing up
- Is there any halfway decent documentation on the wp.media JS class?
- Changing Admin Menu Labels
- Is there ANY way to remove comments function and section totally?
- How to display a static HTML page while setting up a WordPress site?
- How can I uninstall a language?
- Best way to present options for home page in admin?
- js error on post editing page
- How to add a custom metabox to the Menu Management admin screen?
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- How to change the wording in wp-admin back-end?
- How to make ajax call in wordpress in right way?
- Delete Post From front Page ( With Wp-admin restriction )
- Bulk Delete Users Error uri too large
- Add column to pages table
- How to get the password and username of the add new user form (admin back end) in wordpress
- Change the Return URL from the Customizer
- Where can I edit Admin Panel Page file
- WordPress Error establishing a database connection For Admin login only
- Replace wordpress login logo with custom text
- Failed to load resource admin-ajax.php
- Custom WordPress Dashboard for Specific user role
- Add guid filter to attachment in media library grid mode
- Why are my frontend theme styles bleeding into the backend?
- 404 of wp-admin pages [closed]
- Execute script only on certain admin pages
- Uncheck the box “Send User Notification” by default on new-user.php
- WordPress Options Page not working
- Admin account locked out/redirect loop. Other accounts work?
- Sortable columns and admin like interface for tables/report in custom plugin?
- Remove favorites action menu and screen options panel
- No access local wordpress website after PC formating
- is_admin() not working when updating a post in the admin panel
- Why is server preventing admin styles? (Was: Where are WordPress sessions saved?)
- WordPress (admin) posts search GET request filter
- How can I replace dashboard.css and dashboard.min.css (not add new css)
- ‘wp’ hook supposed to trigger when editing a post?
- How to remove dashboard access (wp-admin) for author but not disable the capabilities?
- always by default show welcome panel in the dashboard
- Migrated wordpress site give “Undefined variable: php” warnings
- I am unable to login into my wp-admin
- Is it possible to take over a WordPress site if the old administrator is MIA?
- Dashboard Widget CSS
- How can I prevent a function from loading in the admin screens?
- Move WooCommerce menu entries to top of dashboard
- WP Core hard coded to use http://www.w3.org/1999/xhtml not HTTPS
- 404 Admin Error
- Fix Admin Dashboard Posts tab
- auto generated robots.txt problem
- Change maxlength of link_description in dashbord link section?
- Add a custom field when adding / editing a page / post in admin panel
- Set a minimum and maximum limit of images to select in the MediaUpload component for Block
- Users can login to Website from wp-admin prior to confirmation email
- wp-admin 503 error
- Admin Page access
- On Users (user.php) in wp-admin disable/hide “Bulk Actions” and “Change Role To”
- Add HTML to custom post type edit page
- WP site after login keeps redirecting to looped url [closed]
- Locked out of site admin after change of URL
- Login issue with subdomain installs
- Redirect from wp-admin back to page
- How can I can I make changes to a WP project I pulled from GItHub?
- WordPress critical error on wp-admin page with 100% permissions
- Edit “Not Available” Page
- admin-ajax and external service interaction
- Add admin page to the top of the admin panel
- Admin page changes the $_POST data
- Add item to admin panel – w/o plugin & theme
- site identity will not update [closed]
- Remove menu item dashboard for a unique user
- Reestablishing Automatic and Secure FTP Connection, Primary Domain Change
- str_replace in wp-admin
- Admin area is not loading properly
- Using meta_query in add_query_arg
- Removing delete permanently button in uploading files media
- Is it possible to change the images source that are shown in the admin side?
- Using query string on edit CPT page
- All of my WordPress sites have Bold Open Sans
- Can a wordpress admin see my failed Login attempts?
- Https Website: CSS and JS files load in http and admin page does not load too