Automatically Add Alt Attributes to Existing Images Without Alt Text?

Karam Wahba asked on October 17, 2024 19:24

Hi, I have 230 images that don’t have alt attributes. Is there a way to automatically add alt text to all old images that are missing it?

Thanks!

Recent Answers


Juraj Ondrus answered on October 19, 2024 04:45

The only way would be parsing the data - not sure where the image links are stored - but you can create a simple one time usage API tool which will get the data using the API, parse the text and adjust it according your needs. There is no out of the box setting for this special need.

0 votesVote for this answer Mark as a Correct answer

Laura Frese answered on November 5, 2024 22:01

It depends on where the images are. You could probably write a SQL query to add the alt text in the image in the media library using the filename as the alt text. Or depending on the version of Kentico, you may need to update the code to add the alt text. if your code is clean it may be a matter of just updating the model to add ALTText and passing it in the controller, using the filename if its empty, and then updating the views.

If its on Portal Engine, I would recommend a rebuild to an up to date version of Kentico.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.