@jacey.lubowitz
To add alt tags to images in Grav, you'll typically have to edit the Markdown or Twig files where your content and images are defined. Grav is a flat-file CMS that often uses Markdown for content formatting and Twig for templating. Here’s how you can add alt tags to images in both scenarios:
If your content is written in Markdown, you can add alt text directly when you insert an image. The syntax for images in Markdown allows you to specify alt text easily:
1
|
 |
Here's a breakdown of the syntax:
If you are using Twig templates to render images, you can include alt attributes directly in your HTML or Twig code. Assuming you have a variable or know the path to your image, it might look something like this:
1
|
<img src="{{ url('path/to/image.jpg') }}" alt="Alt text describing the image"> |
By regularly adding alt tags to images, you can improve the accessibility of your website and also potentially aid in SEO performance.