Made method extractImages smaller by introducing private method buildOptions