A burglar was caught after he broke into a garden centre and left muddy footprints at the scene.
Carl Wood was jailed for seven months over the break-in at Notcutts garden centre, Featherstone, on December 13 last year.
Leeds Crown Court heard Wood targeted the business on Wakefield Road in the early hours of the morning.
The 38-year-old entered the premises though a gate before managing to switch off the CCTV system.
Wood then entered the building and went into a staff room where he searched through employees' lockers.
The court heard Wood left blood at the scene as well as muddy footprints which linked him to the offence.
He was also recognised after being captured on a security camera outside the premises.
Wood has previous convictions for burglary and was in breach of a suspended sentence order.
Wood, of Granville Street, Featherstone, pleaded guilty to burglary and breach of a suspended sentence order
Craig Sutcliffe, mitigating, said Wood's previous offending was linked to his addiction to heroin.
Mr Sutcliffe said Wood had been free of the drug for many years but re-lapsed in 2016 following the death of his parents.
He added that nothing was stolen during the burglary.
The court heard Wood lived with his 17-year-old daughter who relied upon him for support and would suffer if he was sent to prison
Wood was jailed for seven months.