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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2221 Views

Avatar
geisha64

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?

Avatar
Liam

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.