It reminded him of what he could achieve in the game and gave him the encouragement he needed to overcome his difficulties.
Although it lifted him from a low ebb, McGregor could never have imagined he would be scoring at the same stadium in Rangers colours in a new role as a marauding right back, netting the second in a 4-1 win over Dumbarton, as he did on Saturday.
The defender, 28, was perhaps a surprise summer signing, but he has grabbed his opportunity as Rangers seek a third consecutive promotion while trying to make their mark in the domestic cups, with a first-round League Cup tie against Queen's Park on the agenda this evening.
He said: "That was the defining picture for me that helped get me through my injury. That was the pinnacle of my first season at St Mirren. It's still on the wall. It's of me wheeling away after volleying past Allan McGregor.
"That pic got me through the darker days. You'd do four or five hours and then suffer a setback. Just looking at that picture helped keep me going. It was just a reminder that only a year before I was folding jeans and there was me wheeling away at Ibrox. I never thought I would be in this position. That's not to say I didn't have aspirations but back then it was just about getting back for St Mirren. I am here now so everything from here on is a bonus."
Ostensibly brought in to fight for a central defensive role, McGregor has made the right-back slot his own since Richard Foster's injury in the SPFL Championship opener against Hearts. Yet, it was an ignominious start. As McGregor tried to get into position having replaced Foster in the aftermath of Nicky Law's equaliser, Hearts went straight upfield, exploiting a gap in the right-back area to score a winning goal.
He said: "We looked back at the mix-up with me coming on. I'm not sure of the ruling but they took the kick-off as I was crossing the centre circle. The ball got played over and it was frustrating because I felt it was my fault. It shouldn't have happened like that. I don't know if they needed to wait until I was in position but the only way I could have sprinted back was if I was Usain Bolt.
"You'd need to sprint 100 yards and then turn to get back into position. Maybe I should have done that but I've never seen anything like that happen. It's frustrating to look back on it. I guess if you have a right-back coming on then you can take advantage but I did feel culpable. It's a position that's new to me. I'm still getting to grips with it but the gaffer has put faith in me and I need to go with it."
Having hammered part-time opposition in each of their last two matches - Clyde 8-1 and Dumbarton 4-1 - Rangers should have few fears about Queen's Park at Airdrie's Excelsior Stadium, with a home tie against Inverness Caledonian Thistle acting as the carrot.
"It is a great incentive for us. We saw at the weekend how good a side big Yogi [John Hughes] is forming up there," said Ally McCoist, the Ibrox manager. "They are deservedly sitting where they are and it is a real golden opportunity for us to get a home tie against currently the best team in the league.
"We have got to get through the tie against Queen's Park first, though. I saw them against Clyde and they were very unlucky to lose against them. I have got a lot of respect for Gus MacPherson because tactically he is clever and knows how to set up teams. I would imagine they will be quite difficult to break down in the early stages of the game.
"We will have to be patient and move the ball quickly, which is what we have been doing lately."