title: jquery get image size and display it in img src tag
body: <p>I am trying to duplicate the way Google displays background image on its main page. Basically here is my code rewrite of it:</p>
  
  <pre><code>&lt;img style="width: 1279px; height: auto; left: 0px; opacity: 0.99999;" src="&lt;?php echo    $_COOKIE['otakuplus_bg']; ?&gt;" id="cpBackgroundImg"&gt;
  </code></pre>
  
  <p>The problem with this is if you look into Googles homepage they actually get the image's dimensions, so in this case, my width is 1279px while height is auto.</p>
  
  <p>This is because I entered the with into CSS manually.  However, google seems to get the exect same data in a different manner; probably via JS. </p>
  
  <p>So, their data would be:</p>
  
  <pre><code>width: 1279px; height: 959.25px; 
  </code></pre>
  
  <p>...for the same image.  I have to rely on auto for the height. If you know of a way I can do this with jQuery, please tell me.  Thank you in advance.</p>