We present rates of convergence for (penalized or sieved) M-estimators of a parameter in a normed vector space, using a loss function that is convex in the parameter. We show how the convexity can be used to 'localize' the problem, i.e., to confine considerations to a small neighborhood in parameter space. The results are then along the lines as those for the least squares problem: rates follow from entropy calculations (on that small neighborhood). As detailed example, we consider the estimation of a log-density.