The UK's consumer prices index (CPI) rose by 8.7 percent in the 12 months to April, data from the Office for National Statistics showed on Wednesday.