addImage: detect png format from img.src - related to #291