improved image tag parsing.