Automatically update image path