enhance image loader, only continue set image when it is still needed.