Self-trapping in random nonhomogeneous media