Title: Automatically adding code into img tag
Last modified: August 18, 2016

---

# Automatically adding code into img tag

 *  [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/)
 * Ok so my topic subject line doesnt make much sense, so i’ll try and be descriptive
   here.
 * Basically all I want to do is have WordPress add ‘rel=”lightbox”‘ into the image
   display code so the code goes from looking like:
 * ‘< a title=”IMG.jpg” href=”URL.jpg”>’
 * to:
 * ‘< a rel=”lightbox” href=”URL.jpg”>’
 * And yes, I want to replace the ‘title’ tag with the rel= tag.
 * Obviously I could edit this in each post I make but that would ultimately be 
   more time consuming. It would be far easier if I modified the code of WordPress
   so when the image uploader sends the code to the editor it already includes the
   rel= tag.
 * Hope to get some help on this soon.
 * Nate Lanxon

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

 *  [ashishmishra](https://wordpress.org/support/users/ashishmishra/)
 * (@ashishmishra)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462306)
 * how it works
 *  Thread Starter [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462310)
 * I solved half of the problem. I needed to edit a section in inline-uploading.
   php’.
 *  Thread Starter [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462526)
 * Bump. Anyone have any ideas with this?
 *  [katgirl](https://wordpress.org/support/users/katgirl/)
 * (@katgirl)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462529)
 * You have posted this question twice.
 * And it helps enormously if you leave the title tag in place within a hyperlink.
   Accessability is important.
 * Specialised readers will voice that tag out, so those who cannot view your website
   will at least have their machine to read it to them and know what that link /
   image is.
 *  Thread Starter [louse101](https://wordpress.org/support/users/louse101/)
 * (@louse101)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462530)
 * I decided to leave the title tag in for that very reason actually.
 * Any idea about inserting the rel=”lightbox” tag though?
 *  [katgirl](https://wordpress.org/support/users/katgirl/)
 * (@katgirl)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462531)
 * See your duplicate post here
 * [wordpress.org/support/topic/89727?replies=3](http://wordpress.org/support/topic/89727?replies=3)

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

The topic ‘Automatically adding code into img tag’ is closed to new replies.

## Tags

 * [img](https://wordpress.org/support/topic-tag/img/)
 * [REL](https://wordpress.org/support/topic-tag/rel/)
 * [tag](https://wordpress.org/support/topic-tag/tag/)

 * 6 replies
 * 3 participants
 * Last reply from: [katgirl](https://wordpress.org/support/users/katgirl/)
 * Last activity: [19 years, 7 months ago](https://wordpress.org/support/topic/automatically-adding-code-into-img-tag/#post-462531)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
