A man from Swindon has been sentenced for sharing his ex partner's sexual photos on WhatsApp and scratching a derogatory term into her car bonnet.