Answers.Body: <p>The <a href="https://github.com/mmikkel/RetconHTML-Craft" rel="nofollow noreferrer">Retcon plugin</a> works great for DOM manipulation. You can override the attribute with a default value or remove it completely.</p>
  
  <pre><code>{{ entry.body|retconAttr('img', {'alt': entry.title}) }}
  </code></pre>
  
  
  
  <pre><code>{{ entry.body|retconAttr('img', {'alt': false}) }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T23:07:42.653Z
Answers.Text: Of course you've got the better answer. :)
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T22:50:31.097Z
Answers.LastActivityDate: 2016-12-21T22:50:31.097Z
Answers.UserDisplayName: carlcs
Answers.Body: <p>Assuming you've got the <code>"source"</code> plugin defined in your <code>craft/config/redactor/myconfig.json</code> Redactor config for that Rich Text field's settings, you can click on the "HTML" button and edit the alt tag manually to whatever you wish. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T22:20:16.477Z
Answers.LastActivityDate: 2016-12-21T22:20:16.477Z
Answers.UserDisplayName: Brad Bell
Body: <p>When I add an image via a rich text (doing as port of a flexi layout approach) somehow an alt tag gets auto output, e.g:</p>
  
  <p>alt="sketch2.jpg#asset:308</p>
  
  <p>I wondered if there is a way to over ride or edit the HTML via the rich text field for the auto generated alt tag?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-21T22:03:55.573Z
Comments.Text: Just click the Rich Text field's HTML button and change it to whatever you want?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-21T22:18:14.250Z
Comments.Text: thats the one, thanks tried earlier I thought but must have mucked up good to go now
Comments.UserDisplayName: user2569
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-21T22:19:02.883Z
Comments.Text: Cool... I'll add that as an answer.
Comments.UserDisplayName: Brad Bell
Tags: <richtext>
Title: Over ride auto-generated alt tag on image added via Rich Text field
ThreadText: # Over ride auto-generated alt tag on image added via Rich Text field
  
  (Asked by: username_0 on 2016-12-21)
  
  When I add an image via a rich text (doing as port of a flexi layout approach) somehow an alt tag gets auto output, e.g:
  
  alt="sketch2.jpg#asset:308
  
  I wondered if there is a way to over ride or edit the HTML via the rich text field for the auto generated alt tag?
  
  **Tags:** richtext
  
  > **Comments:**
  > **username_1**: Just click the Rich Text field's HTML button and change it to whatever you want?  
  > **username_0**: thats the one, thanks tried earlier I thought but must have mucked up good to go now  
  > **username_1**: Cool... I'll add that as an answer.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-12-21. Score: 2
  
  The [Retcon plugin](https://github.com/mmikkel/RetconHTML-Craft) works great for DOM manipulation. You can override the attribute with a default value or remove it completely.
  
  ```
  {{ entry.body|retconAttr('img', {'alt': entry.title}) }}
  
  ```
  
  ```
  {{ entry.body|retconAttr('img', {'alt': false}) }}
  
  ```
  
  > **Comments:**
  > **username_1**: Of course you've got the better answer. :)  
  
  ---
  
  ### Answer by username_1 on 2016-12-21. Score: 1
  
  Assuming you've got the `"source"` plugin defined in your `craft/config/redactor/myconfig.json` Redactor config for that Rich Text field's settings, you can click on the "HTML" button and edit the alt tag manually to whatever you wish.
  
  
  ---
  
  