view photo and view photos work without db