added image optimisation