The coercive field of laterally heterogeneous CoPd films with perpendicular magnetic anisotropy was found to be highly sensitive to their nominal thickness and morphology in the vicinity of the metal–insulator transition. We used the effect to tune the coercivity by the width of lithographically patterned stripes with non-uniform cross-sectional thickness profiles. The phenomenon and the method can be suitable to control the local anisotropy of spintronic logic circuitry elements by their shape and lateral dimensions.