# How to add gallery alt text to images?

**URL:** <https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862>\
**Category:** Developer help\
**Created:** [February 9, 2020, 5:30am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862 "2020-02-09T05:30:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![eidolem](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eidolem/32/6277_2.png) [@eidolem](https://forum.ghost.org/u/eidolem)\
**Post date:** [February 9, 2020, 5:30am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/1 "2020-02-09T05:30:43Z")

</div>

Is there a way to add image alt text to galleries? Google’s accessibility requirements and SEO hate it when images don’t have alt text, and I can’t find a way to add alt text to any images in a gallery.

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [February 10, 2020, 9:47am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/2 "2020-02-10T09:47:19Z")

</div>

Hey @eidolem 👋.  
It’s possible to add captions to image galleries by using the field that appears under a gallery when it’s selected. I don’t think it’s a huge problem in terms of SEO, however I do understand your concerns with accessibility. I did a little research into this: [How do you figure? | scottohara.me](https://www.scottohara.me/blog/2019/01/21/how-do-you-figure.html)

It’s appears that some screen readers don’t announce the gallery container with the caption within it. A little JavaScript can help us improve this:

```plaintext
[...document.querySelectorAll('figure.kg-gallery-card.kg-card-hascaption')].map(gallery => {
	gallery.setAttribute('role', 'figure')
	gallery.setAttribute('aria-label', gallery.querySelector('figcaption').innerHTML)
});

```

This code will add a role of figure to every gallery and use the containing caption to label the gallery 🙂

---

<div class="post-metadata">

**Author:** ![tippingpints](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tippingpints/32/6298_2.png) [@tippingpints](https://forum.ghost.org/u/tippingpints)\
**Post date:** [February 10, 2020, 10:03pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/3 "2020-02-10T22:03:44Z")

</div>

This should really be in the editor. Alt text is absolutely important for SEO for image search.

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [February 11, 2020, 8:44am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/4 "2020-02-11T08:44:35Z")

</div>

Can I ask why you want to improve SEO with just images? 🙂

You could upload them as regular images, that way you’d get to add alt text as well as a caption

---

<div class="post-metadata">

**Author:** ![tippingpints](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tippingpints/32/6298_2.png) [@tippingpints](https://forum.ghost.org/u/tippingpints)\
**Post date:** [February 11, 2020, 6:14pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/5 "2020-02-11T18:14:13Z")

</div>

I’d prefer to improve SEO every way possible.

Alt text is required for accessibility and used by search engines to give context and include them in searches.

Image search has increased traction with Google and is a good source of clicks from searches.

---

<div class="post-metadata">

**Author:** ![Eric\_Morgan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/eric_morgan/32/5909_2.png) [@Eric\_Morgan](https://forum.ghost.org/u/Eric_Morgan)\
**Post date:** [February 13, 2020, 9:34pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/6 "2020-02-13T21:34:53Z")

</div>

I will respond in support of @eidolem & @tippingpints request here.

Every image should have its own alt tag. This is a core concept of Google’s SEO standards.

> Alt text (text that describes an image) improves accessibility for people who can’t see images on web pages, including users who use screen readers or have low-bandwidth connections.
> 
> Google uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image. Also, alt text in images is useful as anchor text if you decide to use an image as a link.  
> [Image SEO Best Practices | Google Search Central &nbsp;|&nbsp; Documentation &nbsp;|&nbsp; Google for Developers](https://support.google.com/webmasters/answer/114016?hl=en)

Further, Google’s John Muller has explicitly stated the importance of including alt tags for images for some time now:

[![](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/8/8/88c9c8dddde819ef7f7de4c61728ef03473d3200.jpeg "English Google Webmaster Central office-hours hangout from August 9, 2019") ](https://www.youtube.com/watch?v=zm7mn2sGuyw)

[![](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/2/c/2cd73ce7f43045ad6444ff4a7ead416896610884.jpeg "English Google Webmaster Central office-hours hangout") ](https://www.youtube.com/watch?v=wC7b9XVPEgc&t=580)

Beyond the confirmed SEO importance, it also is an accessibility issue for those with visual impairment who rely upon alt tags for navigating the web via screen readers or other tools.

---

<div class="post-metadata">

**Author:** ![tippingpints](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tippingpints/32/6298_2.png) [@tippingpints](https://forum.ghost.org/u/tippingpints)\
**Post date:** [February 13, 2020, 11:24pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/7 "2020-02-13T23:24:59Z")

</div>

@Eric_Morgan Thanks for the detailed backup.

Would also be great to add the [schema.org](http://schema.org) info for images and galleries.

Ghost does a great job on the article pages but only for the featured image.

> **[Schema Markup Testing Tool | Google Search Central  |  Google...](https://developers.google.com/search/docs/appearance/structured-data)**
>
> Use the Rich Result Test to see what Google results can be generated for your pages and the schema markup validator for generic schema validation.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [February 14, 2020, 8:12am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/8 "2020-02-14T08:12:14Z")

</div>

If you drag images out of a gallery then you can set their alt text then drag the images back into the gallery, the alt text will be kept.

---

<div class="post-metadata">

**Author:** ![david\_nge](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/david_nge/32/675_2.png) [@david\_nge](https://forum.ghost.org/u/david_nge)\
**Post date:** [April 27, 2021, 2:27am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/9 "2021-04-27T02:27:42Z")

</div>

I tried this. The alt texts are kept but it also breaks the gallery formatting.

Here’s a screenshot of what I see in the [editor vs the published article](https://cln.sh/eyIZ7X).

---

<div class="post-metadata">

**Author:** ![chillbilldill.com](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/chillbilldill.com/32/22849_2.png) [@chillbilldill.com](https://forum.ghost.org/u/chillbilldill.com)\
**Post date:** [February 3, 2023, 5:33pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/10 "2023-02-03T17:33:24Z")

</div>

I would love to see this feature in the editor as well. The single image alt text feature is great, but I need to be able to do this with multiple images in a gallery.

---

<div class="post-metadata">

**Author:** ![rainbowour](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rainbowour](https://forum.ghost.org/u/rainbowour)\
**Post date:** [October 13, 2023, 4:50pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/11 "2023-10-13T16:50:03Z")

</div>

Is there any news about this feature?

Alt tag are a must have to work on SEO, every basic SEO tool will tell you this…  
It helps search engine know what the image is about and returns it in appropriate user image search.

I used to drag all the images out of the gallery one by one, add an alt text and drag it back in but since the last update it is not working anymore…  
When the image is drag back in the gallery, the alt text is removed ☹

Does anyone have a workaround at least?

(Every JS script based solution is not working because search engines do not run JS when crwaling pages)

---

<div class="post-metadata">

**Author:** ![rainbowour](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rainbowour](https://forum.ghost.org/u/rainbowour)\
**Post date:** [July 1, 2024, 4:19pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/12 "2024-07-01T16:19:44Z")

</div>

Hi @prschulz

I am wondering if your team has any new about this feature?

Thanks in advance 🙏

---

<div class="post-metadata">

**Author:** ![prschulz](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/prschulz/32/12872_2.png) [@prschulz](https://forum.ghost.org/u/prschulz)\
**Post date:** [July 1, 2024, 8:46pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/13 "2024-07-01T20:46:57Z")

</div>

Hi @rainbowour - Thanks for bumping this up. There hasn’t been any updates here, but I’ve added your request into our internal feedback tracking and will update this thread as soon as that changes.

Also, I just tested the workaround of dragging images with existing alt text into a gallery card, and that seems to be working fine. Is that not the case for you? It’s possible that it was a short-term issue during the launch of our new editor.

---

<div class="post-metadata">

**Author:** ![rainbowour](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rainbowour](https://forum.ghost.org/u/rainbowour)\
**Post date:** [July 2, 2024, 6:20am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/14 "2024-07-02T06:20:57Z")

</div>

Thanks for your quick answer!

I did not tried the workaround lately, mainly because I did not have news about a fix so I tought it will not work and also because it is really long to do for each image.  
I just tried and it works indeed.

It would be really great (and not so hard to develop?) to have an “alt” field for each image in a gallery that could be filled in directly.

Thanks again for your answer!

---

<div class="post-metadata">

**Author:** ![George\_Liapis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/george_liapis/32/30643_2.png) [@George\_Liapis](https://forum.ghost.org/u/George_Liapis)\
**Post date:** [September 7, 2024, 6:57pm UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/15 "2024-09-07T18:57:05Z")

</div>

@prschulz another bump on this from my end as well, please ☺

I really think both Gallery Images and Header Images should have their Alt Text property edited directly from the editor, and since it really does matter for SEO and it seems to be an easy extra function, I think it should be given some priority — thank you!

---

<div class="post-metadata">

**Author:** ![dphiffer](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/dphiffer/32/34066_2.png) [@dphiffer](https://forum.ghost.org/u/dphiffer)\
**Post date:** [January 2, 2025, 3:29am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/16 "2025-01-02T03:29:03Z")

</div>

I’m also here to bump this. SEO has been mentioned several times already, and I don’t want to minimize the concern there. But really, alt text is a justice issue. Google’s search bot might be the most well-connected visually disabled visitor to my website, but I care more about supporting the human visitors with vision disabilities.

I’ll be frank, this is an embarrassing oversight and it could very well lead to legal risks for ADA compliance, as in Robles v. Domino’s Pizza. Please fix it!

---

<div class="post-metadata">

**Author:** ![adventuretoawaken](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adventuretoawaken/32/33411_2.png) [@adventuretoawaken](https://forum.ghost.org/u/adventuretoawaken)\
**Post date:** [March 1, 2025, 6:41am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/17 "2025-03-01T06:41:04Z")

</div>

Hmm. So I’ve tested this is by adding alt text to an image, dragging the image into a gallery, dragging it back out – and the alt text is not there. Can anyone verify this? Should I add it to the bugs category?

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [March 4, 2025, 10:38am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/18 "2025-03-04T10:38:57Z")

</div>

You’re right, looks like the alt text is preserved when dragging into the gallery but gets lost on the drag back out. A bug report [on GitHub](https://github.com/TryGhost/Ghost/issues/new/choose) would be useful in case someone from the community wants to pick this up before the core team gets to it.

---

<div class="post-metadata">

**Author:** ![adventuretoawaken](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adventuretoawaken/32/33411_2.png) [@adventuretoawaken](https://forum.ghost.org/u/adventuretoawaken)\
**Post date:** [March 5, 2025, 8:51am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/19 "2025-03-05T08:51:14Z")

</div>

Thanks for your reply! So to clarify, the alt text is definitely still there if you add it to the image and then drag it into the gallery? (I’m not sure how to verify that.) The alt text is only being lost when the image is dragged back out of the gallery?

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [March 5, 2025, 9:28am UTC](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862/20 "2025-03-05T09:28:36Z")

</div>

Correct. There are two ways to verify the alt text is still there after dragging an image into a gallery:

1. Do that then preview/publish the post and on the rendered page inspect the image inside the gallery with your browser’s dev tools - you’ll see it has an `alt` text attribute set
2. On the [editor demo site](https://koenig.ghost.org/#/?content=false) you can open the “JSON output” view and perform the same process of adding alt text to an image and dragging it into a gallery - you’ll see the image object stored inside the gallery card has an `alt` text property

You can follow the same steps to verify the alt text gets lost after dragging the image out of the gallery again.

[Next page](https://forum.ghost.org/t/how-to-add-gallery-alt-text-to-images/11862.md?page=2)
