We study minimizers of non-autonomous energies with minimal growth and coercivity assumptions on the energy. We show that the minimizer is nevertheless the solution of the relevant Euler--Lagrange equation or inequality. The main tool is an extension result for convex C1-energies.