Title: Code for uploaded Images
Last modified: August 18, 2016

---

# Code for uploaded Images

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/code-for-uploaded-images/)
 * Is there a better way of handling the code that is generated when an image is
   uploaded ?
    In the (dim and distant) past, you could click and have the code 
   transferred to the post area – that seems more elegant than what we have maybe,
   but then we have pages now don’t we ….

Viewing 1 replies (of 1 total)

 *  [tis](https://wordpress.org/support/users/tis/)
 * (@tis)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/code-for-uploaded-images/#post-178147)
 * I’ve hacked my installation to give a slightly greater level of support. I’m 
   sure someone can come up with a better way to do it:
 * In upload.php I inserted
 * `$poc = urlencode( $piece_of_code );`
 * directly _before_
 * `$piece_of_code = htmlspecialchars( $piece_of_code );`
 * and inserted
 * `<a target="_blank" href="post.php?action=exact&content=<?php echo $poc; ?>">
   <?php _e('Create a new post with this image'); ?></a>
 * directly before
 * `<strong><?php _e('Image Details') ?></strong>: `
 * (both insertions are near the end of the file)
 * then in post.php I inserted
 * `case 'exact':
    $content = stripslashes($content); # Intentional fall through
 * directly before
 * `default:<br />
    $title = __('Create New Post');<br /> require_once ('./admin-
   header.php');
 * This adds a link to the upload-completed page which creates a new post with the
   img link already inserted into the body.

Viewing 1 replies (of 1 total)

The topic ‘Code for uploaded Images’ is closed to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 1 reply
 * 2 participants
 * Last reply from: [tis](https://wordpress.org/support/users/tis/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/code-for-uploaded-images/#post-178147)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
