When data-width and data-height are not defined the script was printing width and height = 0
not sure why this is true of width and height, but not title, id, or the other attributes.