add option to use local image