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 to save WordPress post and attachment images from front end using media library?
- jQuery does not enqueue for my purpose… (before an inline script in the footer)
- Plugin – Make sure jquery is loaded in my settings page plus my JS file
- jQuery in WordPress Plugin
- Redirect to another page using contact form 7? [closed]
- WP Plugin Running before jQuery
- jquery & ajax sending data to php
- 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
- How to include jQuery into my plugin so I can use it on plugin page?
- Run a function when new image is uploaded in media library
- Ajax submit result opens in admin-ajax.php
- zip unzip attachments in wordpress
- how to get the post id in plugin
- Jquery was not found on this server
- insert query on a custom table using ajax with jQuery plugin Jeditable
- How to enqueue scripts in right way in a plugin?
- 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
- Data not insert and update through ajax and jQuery in admin page?
- How to create a digital product download link that can’t be used twice?
- WP ajax requests not stacking?
- Need help about understand api, wp, $ syntax in WordPress plugin script
- Insert Into Post Not Working For Audio File Using jQuery
- How to disable a jQuery plugin on WordPress plugin page
- jquery in wordpress plugin with depdendency
- How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?
- ajax working when function is on child theme but not in plugin page
- Using function from enqueued .js file in theme in plugin?
- jQuery UI tab does not work in the plugin page
- How to overwrite iris color pallates from theme to plugin
- How to submit/upload data to database and in specific folder?
- Cleaning a filename after image sideloading a url that contains `%20`
- Get audio metadata on file upload
- Ajax +wordpress onClick link redirect to new page and create html content
- Use options to control jQuery plugin
- Thickbox in Plugin settings page?
- How to localize data array in plugin’s option page
- sanitizing/escaping plugin options
- Load php file with jquery in single.php
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- Loading Images from Javascript on the Front End
- Why doesn’t update_post_meta work for certain strings?
- Using jQuery prepend() with file include
- How to deal with different jQuery versions?
- Get cat parameter from admin-ajax
- 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?
- How to locate the js code and php code for certain function?
- escape html in jQuery for WordPress
- Jquery php request is returning a weird result
- Query String Filtering API
- Insert and read media from the WordPress library and call in the plugin
- How to copy the all WordPress media items to another custom plugin folder?
- Can’t load a script in my plugin page
- function add custom fields to media gallery
- Trying to rename a file upload as the hash of file content on wordpress
- wordpress file upload from direct directory not working
- jQueryUI draggable doesn’t work in WordPress plugin
- Home page is not loading, where in other pages are displaying on the site
- $ is not defined [duplicate]
- setTimeout not working in jquery
- WordPress Jquery with heade and footer sritp plugin
- WordPress Ajax not returning Response
- 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?
- Add a Script button in W3 Total Cache plugin not working due to conflicting jQuery version
- replacing jquery google cdn with a new version dynamically
- Media Upload to custom database and Custom Directory
- WordPress Dropdown image select
- 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?
- Template file structure , wordpress hook for altering the template
- Script work on non logged in user but not work for logged in user?
- How do I call the dashboard’s sortable javascript in a plugin page?
- Creating custom Insert Media page
- Displaying $_FILES data (simlar to $_POST)