title: Get image src from external url using jQuery
body: <p>I'm looking to find image src from external url</p>
  
  <p>This is my function:</p>
  
  <pre><code>&lt;script&gt;
  function sompret_image_creator(url, ptitle)
  {
      $.ajax(
          { 
          url: url, 
          success: function(data) {
              var img = $.parseHTML( data ).find("img"), 
                  len = img.length; 
              if( len &gt; 0 ){
                  var src = img.first().attr("src"); // get id of first image
              } else {
                  console.log("Image not found");
              }
              console.log(src);
  
              image_tag='&lt;img src="'+src+'" alt="'+ptitle+'"/&gt;';
              return image_tag;
          } 
      });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I have this error </p>
  
  <blockquote>
    <p><strong>Uncaught TypeError: Object [object Array] has no method 'find'</strong> </p>
  </blockquote>