Pb films embedded with homogeneously distributed cobalt (Co) nanoparticles (mean size 4.5 nm) have been prepared. Previous transport investigations have shown that Co particles induce spontaneous vortices below the superconducting transition temperature (T$_{c}$) in zero external magnetic field. In this paper we study in detail the influence of the Co volume franction and an external magnetic field on the superconducting transition in such composites. The large difference in T$_c$-reduction between the as-prepared and annealed samples can be attributed to the different superconducting coherence lengths and the resulting different diameters of the spontaneous vortices in these samples.