Swimming (medley events)
Scotland's Miley won her first senior gold medal in 2010 at the European Championships in Budapest and repeated the feat at the Commonwealth Games in Delhi.
But it was at the 2011 World Championships in Shanghai that she really came of age, winning silver ahead of Olympic champion Stephanie Rice of Australia. All these successes came in the 400m individual medley, which takes place on the opening evening of the London Olympics.
She finished an agonising fourth in the 400m individual medley at the 2009 World Championships, a year after finishing sixth in the same event at the Beijing Olympics.
Did you know?
Her dad and coach, Patrick, invented the Aquapacer - a tiny battery-powered pacemaker that sits on a swimmer's head in training, beeping in time to a programmed tempo.
He combines his coaching with working as a helicopter pilot for oil rigs in the North Sea.