Add image optimisation to build task