added local images functionality