WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I link to the image editor's Edit Image function from the front end?

I know that I can open the lightbox with a simple link, such as <a href="wp-admin/media-upload.php?post_id=719&amp;type=image" id="content-add_image" class="thickbox add_image" title="Add an Image">Upload photos</a>

However unlike opening the image edit lightbox, Edit Image is an input... example: <input type="button" id="imgedit-open-btn-766" onclick="imageEdit.open( 766, &quot;83bc6c7af5&quot; )" class="button" value="Edit Image">

Any thoughts or direction would be appreciated.

The screenshot below is from v3.3 nightly.

EDIT: The direct url to the editor in the backend is wp-admin/media.php?attachment_id=772&action=edit. My goal is to get this edit form to popout in the lightbox without the other wp-admin stuff.

share|improve this question
So, you want only the image editor not the image uploader in popup? – Sisir Mar 11 '12 at 9:02
That is correct @Sisir or at the least open it directly. – mattrepublic Mar 19 '12 at 13:14
up vote 0 down vote accepted

You may add the following scripts:

wp_enqueue_script( 'wp-ajax-response' );

Maybe this already helps?

I think the html in the front-end should be similar to the html in /wp-admin/media.php?attachment_id=...&action=edit

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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