A WA surfer says he did not realise how close a shark came to him in the waves off Esperance until he saw several striking photographs of the encounter that have been widely viewed on social media.

Andrew Johnston told ABC Goldfields-Esperance that when he saw the images by Fritz Debruyn this week, the danger was apparent.

"At the time I didn't think it was that big a shark and that close, but I did lose sight of it when it came right up behind me," he said.

"It was a lot more intense than I thought it was at the time; obviously it was a very close call.

"I was very lucky; you don't get much closer than that without getting touched up by them."

Mr Johnston's run in with the shark took place late last month, just a week before Sean Pollard was attacked by a shark at a different beach in Esperance.

Surfer Andrew Johnston said the shark followed him for a short time before swimming away. ( Supplied: Fritz Debruyn )

The Bunbury surfer lost both hands in the incident.

Mr Johnston said people had asked why he did not scramble to get out of the water as soon as he saw the shark, but he believed staying calm was the right response.

"That's the main thing to do with a shark," he said.

"Other photos show it was going in the opposite direction to me, and when I did slowly start to move away from it, it turned around and started following me.

"Then a wave came and I went with the wave, and it turned around and swam out to sea."

Mr Johnston said the incident gave him a scare but it would not stop him surfing.

"Every time I go in the water, I know it could be my last day - it's just one of the risks of being a surfer," he said.

"You can't escape these creatures. If your number's up, your number's up.

"I accept them, and that's their environment, and that's why I surf.

"I put it down as a very lucky experience on two counts - one that I survived and two that I was in the water with one of these creatures in the wild."