Ashley Rigby, also known as Ashley Bodkin, aged 29, of Ardern Avenue, Dawley, admitted four charges when he appeared before Shrewsbury Crown Court.
Judge Peter Barrie said his offences, set against his history of offending, were so serious that an immediate jail sentence was the only option.
Rigby, who was appearing on remand, had pleaded guilty to possession of 1,427 of the most serious, Category A moving and still, indecent images of children, 2,253 in Category B, and 674 in Category C.
He also admitted breaching his Sexual Harm Prevention Order (SHPO), which had been made in 2016.
Mark Connor, prosecuting, told the court that Rigby had attempted to hide micro SD cards containing the images from police – despite being subject to the SHPO for previous offences, that requires him to make any devices capable of storing digital images available to police on request.
Mr Connor said that some of the images and videos were effectively locked, and could only be accessed with specialist software.
He told Judge Barrie that the images involved girls as young as four years old.
Rigby was also found to have accessed the dark web to look at indecent images of children, and had two encrypted cloud storage devices.
Mr Connor said that Rigby was also found to have underwear for an eight-to-nine-year-old girl in his possession.
The court heard that a police officer had visited Rigby last year and asked to see his devices, and was provided with a mobile phone and a gaming console.
In August officers received intelligence that an indecent image of a child had been uploaded to the web from Rigby's address. He was arrested on September 8 and the micro SD cards were recovered.
Rob Edwards, mitigating for Rigby, said the "worrying feature" is that the defendant "can offer no explanation as to why he views these images".
He said he offered cannabis use as an explanation in part, but only in part.
Mr Edwards added that Rigby had been employed in prison, making T-shirts, and was now moving to another job decorating the prison.
He asked Judge Barrie to suspend the sentence – and have it "hanging over his head for the maximum time the court can impose".
Sentencing, Judge Barrie described the excuse of cannabis use as "pathetic".
Jailing Rigby for two years he said: "Every single image you look at is made by the abuse of a child.
"Every time you look at one of those images you give support and encouragement to the trade in these images and the practice of abusing children to make them.
"You must learn that looking at images of a sexual nature that show children crosses a line you must absolutely not cross and nothing so far seems to have been able to persuade you to get that into your head."
He added: "The number of images I am concerned with is very large. It includes the most serious types of images of harm being done to children. It includes children of a young age, down to four. It also includes images accessed by the dark web."
Judge Barrie said the offences were "so serious" they "can only be dealt with by the immediate sentence of custody".