The electromagnetic field correlators are evaluated around a cosmic string in background of $(D+1)$-dimensional dS spacetime assuming that the field is prepared in the Bunch-Davies vacuum state. The correlators are presented in the decomposed form where the string-induced topological parts are explicitly extracted. With this decomposition, the renormalization of the local vacuum expectation values (VEVs) in the coincidence limit is reduced to the one for dS spacetime in the absence of the cosmic string. The VEVs of the squared electric and magnetic fields, and of the vacuum energy density are investigated. Near the string they are dominated by the topological contributions and the effects induced by the background gravitational field are small. In this region, the leading terms in the topological contributions are obtained from the corresponding VEVs for a string on the Minkowski bulk multiplying by the conformal factor. At distances from the string larger than the curvature radius of the background geometry, the pure dS parts in the VEVs dominate. In this region, for spatial dimensions $D>3$, the influence of the gravitational field on the topological contributions is crucial and the corresponding behavior is essentially different from that for a cosmic string on the Minkowski bulk. There are well-motivated inflationary models which produce cosmic strings. We argue that, as a consequence of the quantum-to-classical transition of super-Hubble electromagnetic fluctuations during inflation, in the postinflationary era these strings will be surrounded by large scale stochastic magnetic fields. These fields could be among the distinctive features of the cosmic strings produced during the inflation and also of the corresponding inflationary models.