Miniaturisation of optical devices