# Default theme discards CSS class for img tags. What now?

**URL:** <https://meta.discourse.org/t/default-theme-discards-css-class-for-img-tags-what-now/258525>\
**Category:** Support\
**Tags:** css\
**Created:** [March 17, 2023, 2:59pm UTC](https://meta.discourse.org/t/default-theme-discards-css-class-for-img-tags-what-now/258525 "2023-03-17T14:59:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [March 17, 2023, 3:13pm UTC](https://meta.discourse.org/t/default-theme-discards-css-class-for-img-tags-what-now/258525/2 "2023-03-17T15:13:39Z")

</div>

> [@jbrains](#):
>
> Is this a defect in the theme? in Discourse?

Hi @jbrains 🙂

Discourse only accepts an array of allowed HTML tags and attributes. Adding an arbitrary class to an element isn’t possible without creating a plugin.

However, if you want to customize an image inside your post, you can put it inside a `[wrap]` tag or something similar.

Have a look at [Customize posts' contents with your own styles](https://meta.discourse.org/t/customize-posts-contents-with-your-own-styles/257738)

---

_[View the full topic](https://meta.discourse.org/t/default-theme-discards-css-class-for-img-tags-what-now/258525)._
