This image released by Universal Pictures shows, from left, Bug, voiced by Jamie Foxx, Reggie, voiced by Will Ferrell, Maggie, voiced by Isla Fisher, and Hunter, voiced by Randall Park, in a scene from “Strays.”
                                 Universal Pictures via AP

This image released by Universal Pictures shows, from left, Bug, voiced by Jamie Foxx, Reggie, voiced by Will Ferrell, Maggie, voiced by Isla Fisher, and Hunter, voiced by Randall Park, in a scene from “Strays.”

Universal Pictures via AP

<p>This image released by Universal Pictures shows, from left, Maggie, voiced by Isla Fisher, Reggie, voiced by Will Ferrell, Bug, voiced by Jamie Foxx and Hunter, voiced by Randall Park, in a scene from “Strays.”</p>
                                 <p>Universal Pictures via AP</p>

This image released by Universal Pictures shows, from left, Maggie, voiced by Isla Fisher, Reggie, voiced by Will Ferrell, Bug, voiced by Jamie Foxx and Hunter, voiced by Randall Park, in a scene from “Strays.”

Universal Pictures via AP

Hey there, fellow obsessive dog owner. Ever wonder what your beloved pooch is thinking? Of course you do. If they could only tell us what’s on their minds, right?

Well, in “Strays,” an aggressively raunchy, gleefully gross and only occasionally truly funny comedy voiced by Will Ferrell and Jamie Foxx, we find out. Turns out our canine friends are endlessly curious about why we collect their poop in little plastic bags. It must be for something really important, they surmise. But what? And why do we keep needing more?

It’s actually one of the film’s cleverer jokes, and Foxx’s Boston terrier, Bug, has an opinion on the matter — but we won’t elaborate because it’s kinda gross. There’s a lot of gross, both kinda and mega, over this film’s 93-minute running time. Also a lot of poop jokes, and penis jokes, both canine and human. You get the picture. Although some of these pictures may stay in your mind for way longer than you’d like.

“Strays,” directed by Josh Greenbaum with a script by Dan Perrault, begins with its star, Reggie, a border terrier with a furiously upbeat attitude, declaring that “today is the best day ever — because every day is the best day ever!” Hmmm, where else have we heard virtually that same line …. Oh yes, in “Barbie”! The resemblance pretty much stops there.

Reggie, voiced by Ferrell with relentless puppy-like innocence, loves his owner, Doug. But Doug doesn’t love him back. Let’s stop here to note that in this film, real dogs play the four leading canines — kudos to their hardworking trainers — and humans appear in supporting roles, including one celebrity cameo and also Will Forte as the most odious dog owner you’ve ever met.

Forte’s Doug is particularly vile to Reggie, because it’s Reggie who dug up (literally) incriminating evidence that Doug was two-timing his girlfriend, leading to her exit. Doug held onto her dog solely out of spite. He never plays with Reggie or takes him outside, except to play a profanely titled “game” in which Doug drives him somewhere and tosses a tennis ball, then drives away, hoping he won’t return. But he always does.

But one day Doug takes Reggie far, far away and the poor pooch can’t find his way back. In this gritty urban setting, he meets the strays — led by Bug (Foxx). Not exactly strays, but taking some time in the streets for various reasons, are sexy Australian Shepherd Maggie (Isla Fisher), and Hunter (Randall Park), a Great Dane with anxiety issues.

The group welcomes Reggie, who wants nothing more than to get home, and introduces him to the adventurous life of a stray. Rule number one: If you want to own something, pee on it. The other rules are too risqué to describe here.

Reggie’s new friends soon make him understand that his owner actually abandoned him. It’s a tough moment. “Maybe I should talk to him, since I’m a therapy dog,” says Hunter. Suddenly, though, this makeshift family is on a mission. Reggie, newly aware of Doug’s mendacity, is determined to get back home and, well, bite off Doug’s favorite body part. This is an experience the rest of the pack refuses to miss. Us, we could maybe pass.

Anyway, the journey will include, among other things: Reggie and Bug getting dragged into the sky by a giant (computer-animated) eagle; the pack eating a forest worth of psychedelic mushrooms and mauling bunnies while high; and everyone falling prey to a dog-catcher. At the pound, it is Reggie who inspires the captive dogs to break free with the memorable slogan: “Let’s all poop to freedom!”

What ensues is one of the grosser scenes you’ll have witnessed in a while, but that’s child’s play compared to the harrowing (and somewhat tonally imbalanced) finale, a painful scene involving four dogs, one human, one baseball bat and one Miley Cyrus song (“Wrecking Ball”) which you may now want to skip for a while.

The moral of the story, if you’re a dog: Family is everything, but sometimes you find it where you least expect. Love your owner but not unconditionally, because he could be a terrible human.

Also: stay away from psychedelic mushrooms. And those plastic poop bags? Still a mystery.

“Strays,” a Universal Studios release, has been rated R by the Motion Picture Association “for pervasive language, crude and sexual content, and drug use.” Running time: 93 minutes. Two stars out of four.