  [Abridged] We combined HST images from the Cosmic Assembly Near-infrared Deep
Extragalactic Legacy Survey with JWST images from the Cosmic Evolution Early
Release Science (CEERS) survey to measure the stellar and dust-obscured star
formation distributions of a mass-complete ($>10^{10}M_\odot$) sample of 69
star-forming galaxies (SFGs) at $0.1<z<2.5$. Rest-mid-infrared (rest-MIR)
morphologies (sizes and S\'ersic indices) were determined using their sharpest
Mid-InfraRed Instrument (MIRI) images dominated by dust emission. Rest-MIR
S\'ersic indices were only measured for the brightest MIRI sources ($S/N>75$;
35 galaxies). At lower $S/N$, simulations show that simultaneous measurements
of the size and S\'ersic index become unreliable. We extended our study to
fainter sources ($S/N>10$; 69 galaxies) by fixing their S\'ersic index to
unity. The S\'ersic index of bright galaxies ($S/N>75$) has a median value of
0.7, which, together with their axis ratio distribution, suggests a disk-like
morphology in the rest-MIR. Galaxies above the main sequence (MS; i.e.,
starbursts) have rest-MIR sizes that are a factor 2 smaller than their
rest-optical sizes. The median rest-optical to rest-MIR size ratio of MS
galaxies increases with stellar mass, from 1.1 at $10^{9.8}M_\odot$ to 1.6 at
$10^{11}M_\odot$. This mass-dependent trend resembles the one found in the
literature between the rest-optical and rest-near-infrared sizes of SFGs,
suggesting that it is due to radial color gradients affecting rest-optical
sizes and that the sizes of the stellar and star-forming components of SFGs
are, on average, consistent at all masses. There is, however, a small
population of SFGs (15%) with a compact star-forming component embedded in a
larger stellar structure. This could be the missing link between galaxies with
an extended stellar component and those with a compact stellar component, the
so-called blue nuggets.
