refactors redirection in Project::ImagesController