We have implemented a thermal mapping technique, scanning Joule expansion microscopy, with a high spatial resolution (about 20 nm) in order to investigate heat generation and dissipation in mesoscopic thin-film structures. In particular, we investigated narrow cobalt-nickel silicide lines having a granular morphology. We are able to directly visualize heating of the silicide in between the grains due to a local increase of the resistance, resulting in current crowding. The increase in resistance can be associated with a local reduction of the silicide thickness in between the larger grains. On the other hand, an enhanced silicide resistivity at grain boundaries may also contribute to the resistance changes.