Let Ω⊂Rn be a bounded open set. Given 2≤m≤n, we construct a convex function ϕ:Ω→R whose gradient f=∇ϕ is a Hölder continuous homeomorphism, f is the identity on ∂Ω, the derivative Df has rank m−1 a.e.\ in Ω and Df is in the weak Lm space Lm,w. The proof is based on convex integration and staircase laminates.