Refactors picture filtering in admin backend and adds specs.

Moved the picture filter logic from controller to model.
Merge pull request #398 from robinboening/2.7-stable

Refactors picture filtering in admin backend and adds specs.