Made image loading more resilient to failure