moved img processing to async task