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
- 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?
- 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?
- 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
- 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?
- 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
- jQuery selectors for editor elements safe to use?
- Why is the temporary upload always 4.1K
- WordPress custom taxonomy check box to dropdown
- jQuery does not enqueue for my purpose… (before an inline script in the footer)
- jQuery in WordPress Plugin
- Redirect to another page using contact form 7? [closed]
- WP Plugin Running before jQuery
- 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
- 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
- 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
- How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?
- 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?
- Get audio metadata on file upload
- Thickbox in Plugin settings page?
- Load php file with jquery in single.php
- Loading Images from Javascript on the Front End
- Why doesn’t update_post_meta work for certain strings?
- How to deal with different jQuery versions?
- Get cat parameter from admin-ajax
- How to locate the js code and php code for certain function?
- How to copy the all WordPress media items to another custom plugin folder?
- Can’t load a script in my plugin page
- Trying to rename a file upload as the hash of file content on wordpress
- wordpress file upload from direct directory not working
- Home page is not loading, where in other pages are displaying on the site
- $ is not defined [duplicate]
- setTimeout not working in jquery
- WordPress Ajax not returning Response
- Hook for validating and rejecting frontend image upload
- 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
- Template file structure , wordpress hook for altering the template
- How do I call the dashboard’s sortable javascript in a plugin page?
- Creating custom Insert Media page
- Changing upload directory for plugin uploads only
- Thumbnails for media Library images
- Remove image in post when it’s removed in media library
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Open media box library from link
- Loading jQuery library from WordPress admin
- upload script in plugin development [duplicate]
- Insert meta-description into Yoast-SEO input-field via JavaScript
- Do uploaded files to /tmp/ get deleted in WordPress automatically?
- Images stored from external API not loading