# Understanding how "alt" attribute works

**URL:** https://meta.discourse.org/t/understanding-how-alt-attribute-works/120579
**Category:** Support
**Created:** [June 17, 2019, 1:10pm UTC](https://meta.discourse.org/t/understanding-how-alt-attribute-works/120579 "2019-06-17T13:10:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [June 17, 2019, 1:10pm UTC](https://meta.discourse.org/t/understanding-how-alt-attribute-works/120579/1 "2019-06-17T13:10:15Z")

</div>

Hello,  
I have a small question on images. I noticed that the images in Discourse are without the `alt` attribute. For example:

```plaintext
<img alt="" width="50" height="50" src="/user_avatar/<domain>/user3242/50/36_2.png" class="avatar">

```

This image is the user’s avatar.  
Is it possible to somehow add this attribute with some default title?

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [June 17, 2019, 2:21pm UTC](https://meta.discourse.org/t/understanding-how-alt-attribute-works/120579/2 "2019-06-17T14:21:21Z")

</div>

Are you talking about all images? all instances of avatars?

Avatars are tricky because ideally an alt tag would describe the content, and they all vary from user to user.

I think in cases where the user avatar is clicked to do something (usually show the usercard) the best practice would be to use the alt text to describe the action (e.g, “username’s user summary” or something)…

---

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [June 17, 2019, 2:42pm UTC](https://meta.discourse.org/t/understanding-how-alt-attribute-works/120579/3 "2019-06-17T14:42:04Z")

</div>

Hi Kris, thank you for the fast reply.  
I was trying to use a SEO analysis website and it said that my webpage uses X images and all of them are without the “alt” attribute. As I understand, those attributes helping the searching engines. The question is, if it’s right and possible to add a title to those images.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 25, 2022, 11:54am UTC](https://meta.discourse.org/t/understanding-how-alt-attribute-works/120579/4 "2022-11-25T11:54:52Z")

</div>


