Pull out private methods in ImagesController