It is permitted to wear such items, and prayer in them is valid. However, it is better to avoid them to the extent possible.
What is strongly impermissible is to draw the entire human body with all its details, or the face and neck with all its details (except when necessary for immediate educational purposes and the like).
As for drawing an outline of the human body, without detailed features, and labeling the various parts, or drawing the details of a particular part (such as the heart), this is permitted, and this is not disliked if for a reasonable purpose (such as education), though blameworthy otherwise.
It is mentioned in Imam `Ala’ al-Din al-Haskafi’s al-Durr al-Mukhtar that, among the types of pictures that are not prohibited to have are those that are:
“(Small) such that the details of their limbs are not apparent to someone who looks down at them standing while they are on the ground, as Halabi mentioned, (or with their head or face cut off) or with an organ effaced out that the body cannot live without, (or of an inanimate object).”
Ibn Abidin clarified in his supercommentary, Radd al-Muhtar,
“(His saying ‘with their head… cut off’) That is, whether it did not have a head in the first place, or it had one and it was effaced.” [ Radd al-Muhtar `ala al-Durr al-Mukhtar, ‘Bab ma yufsid al-salat wa ma yukrahu fiha’]