We prove the absence of a Lavrentiev gap for vectorial integral functionals of the form
$$
F: g+W_0^{1,1}(\Omega)^m\to\mathbb{R}\cup\{+\infty\},\qquad F(u)=\int_\Omega W(x,\mathrm{D} u)\,\mathrm{d}x,
$$
where the boundary datum g:Ω⊂Rd→Rm is sufficiently regular, ξ↦W(x,ξ) is convex and lower semicontinuous, satisfies p-growth from below and suitable growth conditions from above. More precisely, if p≤d−1, we assume q-growth from above with q≤d−1−p(d−1)p, while for p>d−1 we require essentially no growth conditions from above and allow for unbounded integrands. Concerning the x-dependence, we impose a well-known local stability estimate that is redundant in the autonomous setting, but in the general non-autonomous case can further restrict the growth assumptions.