Refactored to improve image fetch performance/reliability.