Two controversial Canadian politicians didn't do themselves any favours by posing for selfies with supporters outside the funeral of former finance minister Jim Flaherty Wednesday.

Federal Liberal Leader Justin Trudeau and Toronto Mayor Rob Ford both took a moment out of the solemn day to pose for photos outside St. James Cathedral in Toronto.

Funeral selfies are considered by many to be insensitive and disrespectful. Several blogs repost Instagram photos that use the hashtag #funeral to shame people who do it.

In December, U.S. President Barack Obama was criticized when he took a photo with British Prime Minister David Cameron and Danish Prime Minister Helle Thorning Schmidt at the memorial service for Nelson Mandela.

The photo of Trudeau shows him smiling alongside a woman while the photo of Ford has the mayor looking awkward as the man he's with gives the camera a thumbs up.

Justin Trudeau gets his picture taken with an unknown person at the State Funeral for Jim Flaherty that took place at St. James Cathedral on Wednesday, April 16, 2014 in Toronto. (Veronica Henri/QMI Agency)

"A passerby asked Justin Trudeau on the street for a photo and he agreed. Nothing more to it," Purchase tweeted. "To assert that Justin Trudeau was disrespectful at Mr. Flaherty's funeral is ridiculous."

A passerby asked @justintrudeau on the street for a photo and he agreed. Nothing more to it. (2/2)