Your issue sounds like a visual bug in the WordPress Media Uploader’s interface after an image has been uploaded, especially since you mentioned that the image appears in the right-hand preview pane but not as a selectable thumbnail.
Try to force refresh the media frame after upload. You can use the add:attachment event to force the media frame to refresh when a new attachment is added. Add this right after you define your image_uploader object:
wp.media.model.Attachments.all.on('add', function(){
image_uploader.uploader.uploader.refresh();
});
I haven’t tested this code, so just adjust it so it fits your code.
Related Posts:
- Checking if a file is already in the Media Library
- Change Media Uploader default directory
- Using the component outside the editor. select(‘core’) is null
- How to replicate Media Library “Add New” on Plugin Settings Page
- How to enable sorting in custom media uploader in plugin
- Upload multiple images and insert them into custom html code
- wp_editor add media button not working
- wp.media gallery collection sometimes undefined
- Changed media upload path for plugin, but generates error & shows wrong url
- How to destroy or dispose wordpress uploder/manager?
- How do you filter get_media_items by mime type in a custom media upload tab?
- Upload to a specific media folder created by FileBird Lite
- Load images from CDN and custom features to “Add Media” dialogue
- upload image to wordpress media library failed for custom post type
- wp media uploader and ID3 tags
- How can I add an image upload field directly to a custom write panel?
- ajaxurl not defined on front end
- How to include jQuery and JavaScript files correctly?
- How Do I Use jQuery UI In My Plugin
- Adding more options to the instance of an image. (Attachment Display Settings)
- Saving data-URI to media library
- How to get attachment id as soon as it is uploaded through media uploader in jquery?
- Changing upload directory for plugin uploads only
- Upload file to remote storage
- How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
- How to Add a .js file Only in one specific Page Dynamically to Head
- how does wp.media javascript library work?
- Help adding image upload functionality to widget
- How to trap “Publish” button to check for meta box validation?
- Why are two functions over-riding each other?
- How can I view all WP generated thumbnails in Media Manager?
- Use js script from one plugin in another plugin
- Bridge WordPress Media API with custom tinyMCE plugin [closed]
- wp_enqueue_style built in styles
- Admin-ajax.php appending a status code to ajax response
- Plugin admin page meta_box toggle and order state not saving
- Proper way to hook wp_get_attachment_url
- Sharing a common set of image files for media library, across all sites within multisite
- Uploading images from a custom page using blueimp uploader?
- Mixing Regular Javascript With jQuery in a Plugin
- jquery document ready function not being called [closed]
- Using the default wordpress uploader inside plugin
- how to add Jquery script to one page?
- Changing upload dir in a plugin regardless of post type
- Is there an event or an other method that tells me the preview is loaded?
- Is it possible to hide media details sidebar when wp.media popup is being opened?
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- Create a new post using rest api and save featured image using an external image url
- how to search users by ajax live search
- jQuery selectors for editor elements safe to use?
- Display WordPress the_content() via data attributes
- Why is the temporary upload always 4.1K
- WordPress custom taxonomy check box to dropdown
- Plugin – Make sure jquery is loaded in my settings page plus my JS file
- should i be checking for jquery before enqueing it in a plugin
- WordPress Specified file failed upload test
- jQuery instantly executes (a button click and css change) on load
- zip unzip attachments in wordpress
- making a plugin that moves other plugins wp_head actions to wp_footer
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- ajax working when function is on child theme but not in plugin page
- Cleaning a filename after image sideloading a url that contains `%20`
- Use options to control jQuery plugin
- How to localize data array in plugin’s option page
- sanitizing/escaping plugin options
- Using jQuery prepend() with file include
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- Ajax on the Administration Side of plugin – returns 0
- How to create wordpress media library UI on plugin page
- How to upload large media file in chunks, without any plugin?
- Query String Filtering API
- Insert and read media from the WordPress library and call in the plugin
- function add custom fields to media gallery
- jQueryUI draggable doesn’t work in WordPress plugin
- setTimeout not working in jquery
- WordPress Jquery with heade and footer sritp plugin
- WordPress5.2.3: Better File Download Plugin validation issue
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- WordPress function is not called and ajax return 0
- Ajax call not working with
- How can I add the Post ID to Class Name in Jquery?
- Script work on non logged in user but not work for logged in user?
- Creating custom Insert Media page
- Displaying $_FILES data (simlar to $_POST)
- Cannot echo a JS variable to a jQuery plugin coming from wp_localize_script
- Page reload occurs before request finishes
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Edit Image/Image Details – Replace button missing
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- How to get the value entered in the input field in wordpres
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- How to access Elementor-navigation-elements via jQuery
- Insert meta-description into Yoast-SEO input-field via JavaScript
- WordPress Playground and uploading permission issue
- Do uploaded files to /tmp/ get deleted in WordPress automatically?
- How to modify the uploads directory for wp.media.frame assigning an subfolder name