# Alt text for images in post

**URL:** <https://talk.jekyllrb.com/t/alt-text-for-images-in-post/2988>\
**Category:** Help\
**Created:** [June 14, 2019, 11:29am UTC](https://talk.jekyllrb.com/t/alt-text-for-images-in-post/2988 "2019-06-14T11:29:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.hetsiuk](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@a.hetsiuk](https://talk.jekyllrb.com/u/a.hetsiuk)\
**Post date:** [June 14, 2019, 11:29am UTC](https://talk.jekyllrb.com/t/alt-text-for-images-in-post/2988/1 "2019-06-14T11:29:10Z")

</div>

Hi, I want to add alt text for main images of the post:  
layout: post  
title: xxx  
description: yyyy  
categories: reviews  
catname: bbbbb  
image: “images/reviews/2019/img1/img.jpg” **for this image how to add alt?**  
thumb: “images/reviews/2019/1t.jpg”  
permalink: “blog/:categories/:year-:month-:day-:slug.html”

---

<div class="post-metadata">

**Author:** ![lego2019](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/lego2019/32/1724_2.png) [@lego2019](https://talk.jekyllrb.com/u/lego2019)\
**Post date:** [June 17, 2019, 6:32am UTC](https://talk.jekyllrb.com/t/alt-text-for-images-in-post/2988/2 "2019-06-17T06:32:13Z")

</div>

Did you try:

```auto
image:
  name: "images/reviews/2019/img1/img.jpg"
  thumb: "images/reviews/2019/1t.jpg"
  alt: Alt Text

```

---

<div class="post-metadata">

**Author:** ![a.hetsiuk](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@a.hetsiuk](https://talk.jekyllrb.com/u/a.hetsiuk)\
**Post date:** [June 17, 2019, 9:02am UTC](https://talk.jekyllrb.com/t/alt-text-for-images-in-post/2988/3 "2019-06-17T09:02:36Z")

</div>

Tried. It doesn’t work.

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [June 17, 2019, 12:22pm UTC](https://talk.jekyllrb.com/t/alt-text-for-images-in-post/2988/4 "2019-06-17T12:22:58Z")

</div>

Your layout(s) need to support that YAML.

If you don’t have something like `<img src="{{ page.image.name }}" alt="{{ page.image.alt }}">` it’s not going to pull in those variables you’ve set.
