title: replace all image src between body tags only
body: <p>I have a variable ($output) in php that holds all html page that will be rendered to the browser but I need to replace all image src with data:image to get a lazyload js to work.</p>
  
  <p>The requirements are:</p>
  
  <ul>
  <li><p>img src don't have the same structure, we have: </p>
  
  <p>&lt;img src="img.jpg" alt='' /&gt;</p>
  
  <p>&lt;img alt="text" src='img.gif'&gt;</p>
  
  <p>&lt;img class="myclass" src="img.png" alt='' /&gt;</p>
  
  <p>... etc</p></li>
  <li><p>I only want to replace images that are between &lt;body {can have optional text}&gt; and &lt;/body&gt;</p></li>
  <li><p>Don't replace img tag between &lt;script {optional text here}&gt; and &lt;/script&gt;</p></li>
  </ul>
  
  <p>Thanks</p>