add functions that saves data for gallery

add functions that saves data for gallery