modified for images.