add img loading directive