Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adding alttext to image in AEM 6.4

Avatar

Level 4

Hi Everyone,

I have a requirement where I have to add altext to all images in my website.

1)Wherever there is a fileupload in dialog, i need to add a textfield and name it as altext.

2)I need to add altext as metadata for all images.

3)altext name should be name of image without the extension of image file name.

 

Whenever I query for image using foundation/components/image I am able to get results.But how to get image which has a fileupload? and fulfill above conditions

 

Please help me in adding a fiddle script to do this.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You can search uploaded file inside /content/ by executing a query against nt:file with the name of name property of image component(file)



Arun Patidar

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

You can search uploaded file inside /content/ by executing a query against nt:file with the name of name property of image component(file)



Arun Patidar

Avatar

Level 4
Thanks Arun. I have written a fiddle script to do that and it is working. How to get metadata for all image nodes either png/svg/jpg and add a custom property altext to metadata

Avatar

Community Advisor
jcr:title is the property name, used to store alt text


Arun Patidar