improve img loader performance