client pagination on uploaded images; some directives extracted to separate files