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”
Did you try:
image:
name: "images/reviews/2019/img1/img.jpg"
thumb: "images/reviews/2019/1t.jpg"
alt: Alt Text
Tried. It doesn’t work.
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.
1 Like