I want to create an edit media button for my plugin, right now you can easily upload images using the WordPress 3.5 media uploader but I want the user to be able to edit the uploaded images, something like this:

example of uploader

Any ideas on how that can be achieved?

Here is the code that I am using to open the media uploader right now:

    var file_frame;
jQuery('#asp_slides_upload').live('click', function(event){


    if (file_frame) {

    file_frame = wp.media.frames.file_frame = wp.media({
        title: jQuery(this).data('uploader_title'),
        button: {
            text: jQuery( this ).data('uploader_button_text'),
        multiple: true

    file_frame.on('select', function() {
        var selection = file_frame.state().get('selection');
        var postID = jQuery('#asp_gallery_id').attr('value');
        attachments = selection.toJSON();
        printableAttachment = JSON.stringify(attachments, null, 2);
            type: "POST",
            dataType: "JSON",
            url: aspAdminUrls.ajaxurl,
            data: {
                action: 'asp_save_slides',
                content: attachments,
                postID: postID
            success: function(data) {



I think you are on the same boat with us: http://wordpress.org/extend/ideas/topic/custom-attachment-type

Its not possible easily at the moment. If you and others supports my idea, maybe we will see it for wordpress 3.7

  • Is this an answer to the OPs question? – Johannes Pille Mar 24 '13 at 13:44
  • Yes. Shortly: not possible easily. And link to idea is explaining why. – Ünsal Korkmaz Mar 24 '13 at 14:29
  • IMHO, "not possible easily" is a non-answer that translates to "possible, but I don't know / am not going to explain how"... – Johannes Pille Mar 24 '13 at 14:52
  • Thank you for your response Ünsal, unfortunately it didnt answer my question. I believe that the new media uploader is intended to work differently as you can only edit the images after you upload them under the attachment post edit screen (you can no longer edit it through the thickbox window). Ill start working on a custom script that allows me to do that in my plugin. – Vitor Argos Apr 13 '13 at 16:16
  • Well, i explained way to edit new media panels here: unsalkorkmaz.com/… Maybe it shows you a way. Meanwhile, you can use old media uploader: wordpress.stackexchange.com/questions/81806/… – Ünsal Korkmaz Apr 13 '13 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.