working out image paths