We report a comprehensive study of the ground-state properties of one and two bosonic impurities immersed in small one-dimensional optical lattices loaded with a few interacting bosons. We model the system with a two-component Bose-Hubbard model and solve the problem numerically by means of the exact diagonalization (ED) method. We report binding energies of one and two impurities across the superfluid (SF) to Mott-insulator (MI) transition and confirm the formation of two-body bound states of impurities induced by repulsive interactions. In particular, we found that an insulator bath induces tightly bound di-impurity dimers, whereas a superfluid bath induces shallower bound states.