removes extraneous whitespace from photos controller