# Display an Image's alt or title attribute in ligthbox overlay

**URL:** <https://meta.discourse.org/t/display-an-images-alt-or-title-attribute-in-ligthbox-overlay/130579>\
**Category:** Feature\
**Created:** [October 9, 2019, 3:17pm UTC](https://meta.discourse.org/t/display-an-images-alt-or-title-attribute-in-ligthbox-overlay/130579 "2019-10-09T15:17:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [November 5, 2019, 10:54am UTC](https://meta.discourse.org/t/display-an-images-alt-or-title-attribute-in-ligthbox-overlay/130579/2 "2019-11-05T10:54:04Z")

</div>

There’s a bit of a long story here. You can read the description of the PRs if you’re interested in learning more. Per

[https://github.com/discourse/discourse/pull/8286](https://github.com/discourse/discourse/pull/8286)

and

[https://github.com/discourse/discourse/pull/8291](https://github.com/discourse/discourse/pull/8291)

If you’re on the latest, you should now be able to change the text that shows in the overlay in the editor

When you upload an image, you’ll get this

`![fileName|690x380](upload://zX6AuAdsNWYzcfIT08zVQPgaJbD.png) `

You can edit `fileName` to whatever you want the image overlay to show.

A quick note:

This was always possible but would have required you to know how markdown handles titles

The way to add a title in markdown looks like this

`![image alt|690x380](upload://zX6AuAdsNWYzcfIT08zVQPgaJbD.png "image title")`

Given that not many people know about this, the first PR above adds the image alt as a fallback before defaulting to the file name. It being a fallback means that if a title is there, then it’s respected, if not, we use the alt.

---

_[View the full topic](https://meta.discourse.org/t/display-an-images-alt-or-title-attribute-in-ligthbox-overlay/130579)._
