title: Images' size in Leaflet (Cloudmade) popups don't seem to count to determine popup's size
body: <p><br />
  I'm having a hard time getting around a problem I came across while using Leaflet's library on a Mapbox map. Specifically, I've written the code so that a popup is bind to each icon/marker on the map. Inside each popup there's an image that links to a different website. Unfortunately it seems that this image's size doesn't count towards the calculation of the size of the actual popup, having the following consecuences:</p>
  
  <ul>
  <li>the image is much bigger than the popup ( <a href="http://postimage.org/image/c7u0n5sx3/" rel="nofollow">http://postimage.org/image/c7u0n5sx3/</a> )</li>
  <li>the autoPan option does't work</li>
  </ul>
  
  <p>My code is the following:</p>
  
  <pre><code>    &lt;?php  
      // Retrieves info from all correct rows in database to further input in javascript
      while ($row = mysql_fetch_assoc($get_info)){
      $name = $row ['nombre'];
      $lat = $row ['lat'];
      $long = $row ['long'];
  
      echo
          "&lt;script type=\"text/javascript\"&gt;
          var latlng = new L.LatLng(".$row ['lat'].", ".$row ['long']."); 
          var flyer = \"&lt;a href='boliches/pdnws/".$row ['nombre'].".php'&gt;&lt;img src='boliches/flyers/".$day."/".$row ['nombre'].".jpg'/&gt;&lt;/a&gt;\";
          var MyIcon = L.Icon.extend({
                  iconUrl: 'boliches/icons/".$row ['nombre'].".png',
          shadowUrl: null, iconSize: new L.Point(50, 50),
          shadowSize: null,
          iconAnchor: new L.Point(25, 25),
          popupAnchor: new L.Point(1, 1)
          }); 
          var icon = new MyIcon();    
          var marker = new L.Marker(latlng, {icon: icon});
          map.addLayer(marker);   
          marker.bindPopup(flyer, {maxWidth:800, autoPan:true});
          &lt;/script&gt;"; 
      }
      ?&gt;
  </code></pre>
  
  <p>Can you think of a possible solution to this? I'm afraid I'm quite a beginner when in comes to programming, but it's been too many days without being able to crack this one. I really appreciate your help! Thank you so much!</p>