Optimisation of doc images