Test images before attempting to display.