By absorbing various amounts of hydrogen in the same niobium sample we are able to change the local superconducting properties thus introducing quenched disorder in a controlled manner. Its effect on the magnetic flux penetration in NbH x thin films on A-plane (1120) and R-plane (1102) sapphire substrates is systematically investigated using a magneto-optical technique. With increasing hydrogen content, flux penetration patterns are observed to become more irregular. At high hydrogen concentrations non-superconducting inclusions are formed. The substrate orientation also has a strong influence on the observed behavior, revealing line-shaped avalanches at 4.2 K for A-plane substrates and a more continuous but spatially irregular behavior for R-plane substrates.