optimize images after downloading