Adding Img Alt tags

Hi Guys,
Is there a way to add img alt tags from the file manager? Or another easy way to do so?

Thank you,
Daun

You would add Alt text to the image element (in the code), not to the image file itself (in the File Manager).
So you can do this either in the code view of any editor window or via the WYSIWYG view when selecting the image:

Thank you Adam, what if you are adding the image as an upload to a Custom Module?

ie. https://tinyurl.com/yjdnv992

I would then code it into your module’s layout/s where you have the <img> element.
If you just want to use the module item’s name for the Alt text, for example:

<img src="{{this.primaryPhoto}}" alt="{{this.name}}">

Or if you need it to be custom text you’d have to create another custom field for it:

<img src="{{this.primaryPhoto}}" alt="{{this.primaryPhotoAltText}}">

Hi All,
I was able to resolve the primary layout using the code above. I do also have a module snippet that is not using a layout in the Contact page here: https://familyrtc.org/fosteringidaho/contact

Not able to figure out which property will make the alt appear as the firstname, lastname.

Any help is appreciated.
Thank you,
Daun

Hi @Daun_Jacobsen
Because it’s using a forloop instead of a layout you need to reference the properties with the variable used in the foorloop, which in your case is i.

So instead of:

{{this['FirstName']}}

it would be:

{{i['FirstName']}}

this always refers to the layout/item you are rendering in. So using this in a custom, on-page forloop would be referencing the page itself.