title: How to find all img src attributes from sfpg (Single File PHP Gallery)
body: <p>I am trying to create a user script in Greasemonkey to iterate over all the imgs in the following gallery to download the actual images from the thumbnails.</p>
  
  <p>The difference between thumbnail and image is the value of the url query parameter; so we have to change <strong>cmd=thumb</strong> into <strong>cmd=image</strong>. Which is pretty easy.</p>
  
  <p>so first I am trying get all the img tags in a var and then trying to iterate over all the tags and in each iteration using string replace to change the thumb into image to get the actual image.</p>
  
  <p>But this method is not retrieving any img!!! In every other page I can find all imgs , except this page. </p>
  
  <p>Would be helpful if anyone can tell me why it is happening?</p>
  
  <p>URL:
  <a href="http://sye.dk/sfpg/demo/index.php?sfpg=RnJ1aXRzL09yYW5nZSBGcnVpdHMvKipkN2UwYWI2MTRkZGU2MTBiYjliMzEzM2M2ZDUzODE3MTY0OWU4ZWI3YjU0MzcwMTU2ODIxN2YxMTA2NWFiOWEw" rel="nofollow noreferrer">http://sye.dk/sfpg/demo/index.php?sfpg=RnJ1aXRzL09yYW5nZSBGcnVpdHMvKipkN2UwYWI2MTRkZGU2MTBiYjliMzEzM2M2ZDUzODE3MTY0OWU4ZWI3YjU0MzcwMTU2ODIxN2YxMTA2NWFiOWEw</a></p>
  
  <p>In the following snippet , first I am trying to see all the img tags in console, but its returning only baseURI, not the internal imgs. I have also checked the tags.count is returning 1 , instead of 3, as there are three images on this page. Unless I am able to find the imgs, I can't do the next part , i.e., changing the URL and autodownload. That code is ready with me and working on other websites.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// ==UserScript==
  // @name     Unnamed Script 629250
  // @version  1
  // @match        http://sye.dk/sfpg/demo/index.php?sfpg=RnJ1aXRzL09yYW5nZSBGcnVpdHMvKipkN2UwYWI2MTRkZGU2MTBiYjliMzEzM2M2ZDUzODE3MTY0OWU4ZWI3YjU0MzcwMTU2ODIxN2YxMTA2NWFiOWEw
  // @grant    none
  // ==/UserScript==
  
  (function() {
      'use strict';
   var tags = document.getElementsByTagName('img');
         
    for(var i=0;i&lt;tags.length;i++){
   
        console.log(tags[i])
     
  }
  })();</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://i.stack.imgur.com/ilMeq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ilMeq.png" alt="Document Inspector Screenshot on Google Chrome"></a></p>