Mid-infrared imaging of active galaxies. Active nuclei and embedded star clusters