There is nothing wrong with wearing a necklace on which is a picture of al-Masjid al-Aqsa or the holy Ka’bah, unless it has the name of Allaah or anything from the Qur’aan engraved on it, in which case it is not allowed to wear it because it is disrespectful, or the aim in wearing it is to seek blessing from the picture of these places that are venerated by Muslims. In that case it is not permissible to wear it.
See also question no. 91370.
And Allaah knows best.