# Adding custom class to img tag

**URL:** https://meta.discourse.org/t/adding-custom-class-to-img-tag/21425
**Category:** Feature
**Created:** [October 22, 2014, 5:06pm UTC](https://meta.discourse.org/t/adding-custom-class-to-img-tag/21425 "2014-10-22T17:06:10Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [October 20, 2017, 2:43pm UTC](https://meta.discourse.org/t/adding-custom-class-to-img-tag/21425/7 "2017-10-20T14:43:50Z")

</div>

This was recently changed:  
[https://github.com/discourse/discourse/commit/9cb088e3f6762df3369e647b1de122edd536fa30](https://github.com/discourse/discourse/commit/9cb088e3f6762df3369e647b1de122edd536fa30)

As there wasn’t a restriction on classes, it would have been possible to do something like this:

[https://global.discourse-cdn.com/meta/original/3X/9/b/9b413d8b2d4b627944a033057956e11f08520900.mp4](https://global.discourse-cdn.com/meta/original/3X/9/b/9b413d8b2d4b627944a033057956e11f08520900.mp4)

---

_[View the full topic](https://meta.discourse.org/t/adding-custom-class-to-img-tag/21425)._
