image location utils, now hopefully less stupid