In one horrific image, the young child was caught being placed on a level crossing for a picture and images have been posted on social media showing people posing on the rails in Harlech, Gwynedd.
Rail officials said videos and pictures had attracted more than one million views on popular social media sites including Instagram, Snapchat and TikTok.
Network Rail said there had been 433 serious incidents reported since the start of the Covid-19 pandemic in Wales alone.
Network Rail has now joined with British Transport Police and Transport for Wales to launch a new campaign against the craze
Train driver Jody Donnelly said: “Over the years, myself and many of my colleagues have had to deal with hundreds of frightening and sometimes tragic occurrences at level crossings.
“People seem to think that the worst won’t happen to them but if you’re caught short at a level crossing, it simply isn’t true.
“Unlike cars, trains can take hundreds of metres to stop when travelling at top-speed, meaning that a decision to nip across the tracks can be fatal.”
Network Rail has now joined with British Transport Police and Transport for Wales to launch a new campaign against the craze, which often uses hashtags like #railphotography and #railwayshoot.
Inspector Richard Powell, of British Transport Police, said: “Messing around on level crossings – including lingering to take photos – is illegal and extremely dangerous. You could be taken to court and face a £1,000 fine.
“Trains approach almost silently, so if you’re distracted, you won’t notice until it’s too late. Take care around level crossings.
“No photograph is worth the risk to you or the consequences for your family and any bystanders.”