add img loading method