Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Modifying Alt Attribute in Images

Go to End

2 Posts   1743 Views


Community Member, 5 Posts

16 January 2009 at 12:48pm

Edited: 16/01/2009 1:47pm

I noticed when I do "insert image", the alt attribute is missing from img tag:
<img class="left" src="assets/Uploads/SilverStripeLogo.png?r=59381" hspace="null" vspace="null" width="424" height="376" align="null" >

It has other attributes that I don't need such as hspace, vspace, and class. Is there a workaround so that when I do an "insert image", it will automatically insert the alt tag?

From searching thru the forum and the documentation, it looks like the only method to update an image alt attribute is via the HTML in the Content Editor. Is this the case or am missing something?


Community Member, 470 Posts

17 January 2009 at 9:59pm

Ya, in 2.2.x it handled it pretty badly with the extra garbage code.

In 2.3 it's all cleaned up and working like expected.