Advanced search missing photos

Based on #1189.

Only the last commit is new