We review some recent learning approaches in variational imaging based on bilevel optimization and emphasize the importance of their treatment in function space. The paper covers both analytical and numerical techniques. Analytically, we include results on the existence and structure of minimizers, as well as optimality conditions for their characterization. On the basis of this information, Newton-type methods are studied for the solution of the problems at hand, combining them with sampling techniques in case of large databases. The computational verification of the developed techniques is extensively documented, covering instances with different type of regularizers, several noise models, spatially dependent weights and large image databases.