For ill-posed inverse problems, a regularized solution can be interpreted as a mode of the posterior distribution in a Bayesian framework. This framework enriches the set of possible solutions, as other posterior estimates can be used as a solution to the inverse problem, such as the posterior mean which can be easier to compute in practice. In this paper we prove consistency of Bayesian solutions of an ill-posed linear inverse problem in the Ky Fan metric for a general class of likelihoods and prior distributions in a finite-dimensional setting. This result can be applied to study infinite dimensional problems by letting the dimension of the unknown parameter grow to infinity which can be viewed as discretization on a grid or spectral approximation of an infinite dimensional problem. The likelihood and the prior distribution are assumed to be in an exponential form that includes distributions from the exponential family, and to be differentiable. The prior distribution can be non-conjugate or improper. The observations can be dependent, and no assumption of finite moments of observations, such as expected value or the variance, is necessary thus allowing for possibly non-regular likelihoods. If the variance exists, it may be heteroscedastic, namely, it may depend on the unknown function. We observe quite a surprising phenomenon when applying our result to the spectral approximation framework where it is possible to achieve the parametric rate of convergence, i.e. the problem becomes self-regularized. We also consider a particular case of the unknown parameter being on the boundary of the parameter set, and show that the rate of convergence in this case is faster than for an interior point parameter.