title: Change all <img> tag src attributes in html document?
body: <p>Given any html document with any number of <code>&lt;img&gt;</code> tags, and using javascript, how can I change all the src attributes of the <code>&lt;img&gt;</code> tags?</p>
  
  <p>For example change all src attributes in <code>&lt;img&gt;</code> tags from "<a href="http://example.com/somerandomimage.jpg" rel="nofollow">http://example.com/somerandomimage.jpg</a>" to "<a href="http://example.com/somerandomimage.jpg?foo=bar" rel="nofollow">http://example.com/somerandomimage.jpg?foo=bar</a>"</p>
  
  <p><strong>EDIT</strong> jquery and other javascript libraries are ok. No need to be vanilla javascript.</p>