title: unable to convert <img/> tag to <amp-img> successfully
body: <p>Here is my code using HTML string inside amp page:</p>
  
  <pre><code>&lt;?php
  use DomDocument;
  use Lullabot\AMP\AMP;
  use Lullabot\AMP\Validate\Scope;
  use common\helpers\StringHelper;
  use yii\helpers\Html;
  use yii\helpers\Url;
  $amp = new AMP();
  
  &lt;body&gt;
      $html = $model-&gt;content;
      $amp-&gt;loadHtml($html);
      $amp_html = $amp-&gt;convertToAmpHtml();
      if(isset($model['image'])){ ?&gt;
          &lt;section class= "image-banner"&gt;
              &lt;amp-img src="&lt;?= Url::to('@web/uploads/'.$model-&gt;image); ?&gt;"
              layout="responsive" width="900" height="467"&gt;&lt;/amp-img&gt;
          &lt;/section&gt;
      &lt;?php } ?&gt;
  
  &lt;section class="content-section"&gt;
      &lt;h1&gt;&lt;?= $model-&gt;title;?&gt;&lt;/h1&gt;
      &lt;?= $amp_html ?&gt;
      &lt;div&gt;
          &lt;?php if(Yii::$app-&gt;controller-&gt;id == "careers"){?&gt;
              &lt;a href= "&lt;?=Url::to(['/careers/'.$model-&gt;slug]) ?&gt; "&gt;
                  Fill application form.
              &lt;/a&gt;
          &lt;?php }?&gt;
      &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>Result after inspect in browser:</p>
  
  <pre><code>&lt;a class="align-left" href="https://freelancercompany.com.np/admin/index.php?r=media%2Fview&amp;amp;slug=dg2"&gt;
      &lt;amp-img class="media-image media-9 align-left i-amphtml-element i-amphtml-layout-responsive i-amphtml-layout-size-defined" src="https://freelancercompany.com.np/uploads/2017/06/dg2.png" alt="dg2" width="1300" data-id="9" height="431" layout="responsive"&gt;
      &lt;i-amphtml-sizer style="display: block; padding-top: 33.1538%;"&gt;&lt;/i-amphtml-sizer&gt;&lt;/amp-img&gt; 
  &lt;/a&gt;
  </code></pre>
  
  <p>Here the problem is I am unable to get the image it comes blank in place. As you can see image source clearly on amp-image tag.</p>