original_string: public static function processImageHtml($html, PageInterface $page)
      {
          $excerpt = static::getExcerptFromHtml($html, 'img');
  
          $original_src = $excerpt['element']['attributes']['src'];
          $excerpt['element']['attributes']['href'] = $original_src;
  
          $excerpt = static::processLinkExcerpt($excerpt, $page, 'image');
  
          $excerpt['element']['attributes']['src'] = $excerpt['element']['attributes']['href'];
          unset ($excerpt['element']['attributes']['href']);
  
          $excerpt = static::processImageExcerpt($excerpt, $page);
  
          $excerpt['element']['attributes']['data-src'] = $original_src;
  
          $html = static::getHtmlFromExcerpt($excerpt);
  
          return $html;
      }
code: public static function processImageHtml($html, PageInterface $page)
      {
          $excerpt = static::getExcerptFromHtml($html, 'img');
  
          $original_src = $excerpt['element']['attributes']['src'];
          $excerpt['element']['attributes']['href'] = $original_src;
  
          $excerpt = static::processLinkExcerpt($excerpt, $page, 'image');
  
          $excerpt['element']['attributes']['src'] = $excerpt['element']['attributes']['href'];
          unset ($excerpt['element']['attributes']['href']);
  
          $excerpt = static::processImageExcerpt($excerpt, $page);
  
          $excerpt['element']['attributes']['data-src'] = $original_src;
  
          $html = static::getHtmlFromExcerpt($excerpt);
  
          return $html;
      }
code_tokens: public static function processImageHtml ( $ html , PageInterface $ page ) { $ excerpt = static :: getExcerptFromHtml ( $ html , 'img' ) ; $ original_src = $ excerpt [ 'element' ] [ 'attributes' ] [ 'src' ] ; $ excerpt [ 'element' ] [ 'attributes' ] [ 'href' ] = $ original_src ; $ excerpt = static :: processLinkExcerpt ( $ excerpt , $ page , 'image' ) ; $ excerpt [ 'element' ] [ 'attributes' ] [ 'src' ] = $ excerpt [ 'element' ] [ 'attributes' ] [ 'href' ] ; unset ( $ excerpt [ 'element' ] [ 'attributes' ] [ 'href' ] ) ; $ excerpt = static :: processImageExcerpt ( $ excerpt , $ page ) ; $ excerpt [ 'element' ] [ 'attributes' ] [ 'data-src' ] = $ original_src ; $ html = static :: getHtmlFromExcerpt ( $ excerpt ) ; return $ html ; }
docstring: Process Grav image media URL from HTML tag
  
  @param string $html         HTML tag e.g. `<img src="image.jpg" />`
  @param PageInterface $page  The current page object
  @return string              Returns final HTML string
docstring_tokens: Process Grav image media URL from HTML tag