A man has been locked up for more than two years for possessing indecent photographs of children.