A paedophile has avoided jail after being caught with over 1,700 child sex abuse images.