Image "description" Field not working for alt text

Hello,

I am attempting to use the image “description” field for alt text in my freemarker.

Unfortunately I get the following error when I try using {img.description} Failed at: {img.description} [in template “webfile:/freemarker/nhbccontentmanagementsystem/blocks/services-card.ftl”

It’s as if it can’t see the field at all even though it is there in the CMS and has a value.

The other image properties work fine.

Any help would be greatly recieved :slight_smile:

Hey Sam,

Make sure your imageset bean has a getter method called getDescription which reads that property in the repository.

Also, note that if you are referring to the ootb “hippogallery:description” property this one is available on the image set (look at org.hippoecm.hst.content.beans.standard.HippoGalleryImageSet) and not on a specific image variant.

Kind regards,
Lef