modify the way image dir gets set