Extract session values into memoized functiono
Read number of photos before and after triggering