Let W denote d-dimensional Brownian motion. We find an explicit formula for the essential supremum of Hausdorff dimension of W(E).F, where E.(0,.) and F.Rd are arbitrary nonrandom compact sets. Our formula is related intimately to the thermal capacity of Watson [Proc. Lond. Math. Soc. (3) 37 (1978) 342.362]. We prove also that when d.2, our formula can be described in terms of the Hausdorff dimension of E.F, where E.F is viewed as a subspace of space time.