persist photos in local storage