This work is concerned with the theory of graphical representation for the Ising and Potts models over general lattices with non-translation invariant external field. We explicitly describe in terms of the random-cluster representation the distribution function and, consequently, the expected value of a single spin for the Ising and q-state Potts models with general external fields. We also consider the Gibbs states for the Edwards–Sokal representation of the Potts model with non-translation invariant magnetic field and prove a version of the FKG inequality for the so called general random-cluster model (GRC model) with free and wired boundary conditions in the non-translation invariant case. Adding the amenability hypothesis on the lattice, we obtain the uniqueness of the infinite connected component and the almost sure quasilocality of the Gibbs measures for the GRC model with such general magnetic fields. As a final application of the theory developed, we show the uniqueness of the Gibbs measures for the ferromagnetic Ising model with a positive power-law decay magnetic field with small enough power, as conjectured in Bissacot et al. (Commun Math Phys 337: 41–53, 2015).