How to link to the image editor's Edit Image function?

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=" 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.

Solutions Collecting From Web of "How to link to the image editor's Edit Image function?"

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

Adding to xaedes answer: the correct URL to get to the edit media page is similar to:

[your site url]/wp-admin/upload.php?item=633

If the sub-site on a multisite install, the URL is similar to

[your site url]/subsite/wp-admin/upload.php?item=633

…changing the item number parameter as needed.

Note that you can get an array of attachment details with the wp_prepare_attachment_for_js function

You should test if the user has proper privileges to edit the picture. And note that when you ‘x’ out of the edit screen, you are returned to the media page, not your custom page. (There might be a way to change the ‘x’ to get back to your page.)