Adding alttext to image in AEM 6.4 | Community
Skip to main content
Level 3
January 10, 2020
Solved

Adding alttext to image in AEM 6.4

  • January 10, 2020
  • 1 reply
  • 2012 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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)

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
January 15, 2020

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
minisanuAuthor
Level 3
January 16, 2020
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