A 29-year-old Perth man who assaulted a Customs officers who found steroids and illegal pornography in his luggage has been jailed for eight months.

Matthew John Gimblett had just arrived at Perth Airport from Indonesia in October last year when Customs officers found illegal pornography and steroids, for which he did not have a permit.

Perth Magistrates Court was told that when Customs went to seize the goods, Gimblett made threats, and then assaulted an officer. During a later search of his home, Gimblett again threatened officers.

Gimblett was convicted of charges including causing harm to a Commonwealth public official, threatening harm to a Commonwealth public official, importing prohibited items and knowingly or recklessly making false statements to Customs.

Along with the jail term, Gimblett was fined $3,500.

Customs spokeswoman Tonie Differding said the sentence sent a strong message.

"If you threaten, attempt to intimidate, or assault a Customs and Border Protection officer carrying out their duties, charges can and will be laid," she said.

Gimblett could be released in four months.