Width of image

Width of image

I'm trying to find the displayed width/height of an image, but keep getting slightly off values.
After researching it seems it should be in a window.load function, so here's what I have:

  1. $(window).load(function() {
  2.   $(function() {
  3.       $('#item0_%id% ul li#itemimg0_%id% img').load(function() {
  4.       var w = this.width;
  5.       var h = this.height;
  6.       $(this).removeAttr('width').removeAttr('height');
  7.       var image = $('#item0_%id% ul li#itemimg0_%id% img');
  8.       var imgwd = image.width();
  9.       console.log('Wd: ' + imgwd);
  10.       var imght = $(this).height();
  11.       console.log('Ht: ' + imght);
  12.       $(this).attr({height:h, width:w});
  13.       var newsz = imgwd + 'px x ' + imght + 'px';
  14.       $('#suggimgsize_%id%').append(newsz); 
  15.      });
  16.   });
  17. });

FYI - when I place this function in doc.ready, it gives a width of 900, which is entire window width.
When running as shown above, I get nothing in console output.

I'm targeting the left dark blue image, trying to get a width that matches 272px, but I need some help w/ my code.

Thanks, Bill