During Robert Riley's sentencing, chairwoman of the bench Georgina Scannell voiced her disgust at his "vile" and "offensive" online messages.
The offensive messages outraged the public. You had complete disregard for the tragic death of Ann Maguire.
Besides this, countless other vile messages were made by you.
The bench finds these were racially and religiously aggravated.
The offences are so serious that only a period of immediate custody can be justified.
More top news
71-year-old Raymond Hodges was convicted of 24 charges spanning almost a decade.
The Cardiff arts centre scrapped the event after critics deemed the fun run "sexist".
Emma Picton-Jones' husband died last summer. Now she wants to help others in the agricultural industry talk about mental health.