Taiwan is set to become the first country in Asia to ban the consumption of dog and cat meat, as increasing pet ownership across the continent has seen attitudes shift.

The revised Animal Protection Act imposes a fine of up to 250,000 Taiwan dollars (£6,500) for eating dog or cat meat, while the penalties for animal cruelty or slaughter were raised to up to two years in prison and fines of up to 2m Taiwan dollars (£52,000).

Repeat offenders can be jailed for up to five years and face stiffer fines, and those convicted under the new law may also be publicly shamed, with their names and photos published by the government.

The law also makes it illegal to “walk” a pet while riding a scooter or driving a car. The amendment still needs to be signed by the president, but could be law by the end of April.

Dog meat is not widely consumed in Asia, but it is featured in some regional cuisines, and cat meat is more rare. Dogs were once widely consumed in Taiwan, but are now almost universally seen as pets rather than food on the island.

The most notorious mass slaughter of dogs for food occurs once a year in China during the Yulin dog meat festival. About 10,000 dogs are killed every year and eaten throughout the southern city of Yulin, but the festival has increasingly attracted the ire of animal rights activists.

Taiwan previously banned the sale of dog and cat meat in 2001, and some local governments had prohibitions on consumption.