guarding against image source == NULL