Title: inline-uploading.php &#8211; important image question
Last modified: August 18, 2016

---

# inline-uploading.php – important image question

 *  [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/)
 * Under the ‘// Construct the attachment array’ section, how do I get the code 
   to include ‘rel=”lightbox”‘ in the HTML it generates for the uploaded image to
   be displayed?
 * I want the code to look like:
 * < a rel=”lightbox” class=”imagelink” href=”IMG.jpg”>
 * Any help REALLY appreciated hugely.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462527)
 * Bump. Anyone have any ideas with this?
 *  [katgirl](https://wordpress.org/support/users/katgirl/)
 * (@katgirl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462528)
 * Okay. I’m not sure what you mean by _// Construct the attachment array’ section_.
   A little more information would be nice.
 * But if you’re talking about using the img button inside Write /Post, you need
   to state the IMAGE URL path (where you store your images on your server), and
   then give a description of the image itself.
 * You can modify whatever else you need to in the HTML inside the post you’re working
   on.
 * Also an IMAGE URL doesn’t have **a href** in the tag. It does have **img src**.
   You can wrap the image within a link using HTML by doing this:
 * [a href=”url” title=”lightbox”][img src=”imageurl.jpg” alt=”descript of piccy”
   class=”imagelink” /][/a]
 * hope that helps
 * Edit: See also here for other replies to same question.
    [wordpress.org/support/topic/89727?replies=3](http://wordpress.org/support/topic/89727?replies=3)
 *  Thread Starter [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462532)
 * I’ll try to be a little more specific by being a little less complicated..
 * We upload an image using the upload form on the Write/Post page. We then send
   it to the editor as a thumbnail that is linked to the full-size image. WordPress
   generates the HTML for the image when it sends the thumbnail to the editor.
 * What I want to do is add a tag inside the HTML it generates. The HTML would include
   the IMG tag, the TITLE tag and the A HREF tag. I want to include one more tag
   in this circumstance.
 * I really hope this is clearer to understand.
 *  [katgirl](https://wordpress.org/support/users/katgirl/)
 * (@katgirl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462533)
 * _The HTML would include the IMG tag, the TITLE tag and the A HREF tag. _
 * Okay. You _must be_ running a different version of WordPress to me, because as
   I stated above the image upload via Write/Post does **not** insert [a href] link
   within an image tag.
 * _WordPress generates the HTML for the image when it sends the thumbnail to the
   editor._
 * I don’t know anything about an editor, but the software that drives WordPress
   produces semantically correct HTML for image tags because images are images –
   not links. There is a difference.
 * You can _wrap_ your image within a hyperlink, as semantically correct HTML thus
   making the image ‘clickable”.
 * I understand you wish to cut down on valuable time, but seriously when you consider
   the time spent writing a post versus a microsend spent inserting additional HTML
   inside an image tag is hardly something to worry about.
 *  Thread Starter [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462534)
 * I’m sorry. I think I may be wasting more of your time pondering this problem 
   than I’d spend manually inserting a tag. I’ll let this topic die. Thank you for
   your thoughtful advice on this and the other topics.
 *  [fiskmannen](https://wordpress.org/support/users/fiskmannen/)
 * (@fiskmannen)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462653)
 * No please, I really need this too. When you have a page that use a lot of images
   and users that don’t know html at all it’s very nice if it’s automatic.
 *  [thebbps](https://wordpress.org/support/users/thebbps/)
 * (@thebbps)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462706)
 * there’s a bit of confusion here… the original question asked how to insert a 
   bit of code into an img tag, he meant to ask how to add it to the ahref tag of
   an img.
 * Lightbox is a little plugin that let’s you display thumbnails on your page, and
   when someone clicks on one, it pops it up onscreen in a cool way. To use the 
   plugin, you upload your photo, then pick “using thumbnail” and “linked to image”.
   the “linked to image” part adds the ahref tag around the img tag. we need to 
   know how to add in some code that gets passed across when it makes the ahref 
   tag that surrounds the img tag

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘inline-uploading.php – important image question’ is closed to new replies.

 * 7 replies
 * 4 participants
 * Last reply from: [thebbps](https://wordpress.org/support/users/thebbps/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/inline-uploadingphp-important-image-question/#post-462706)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
