Allaah has forbidden zina (adultery, fornication) and homosexuality, and He has forbidden all means that may lead to that. Allaah has enjoined the believers to lower their gaze and refrain from looking at haraam things, and from that which it is feared will cause one to fall into haraam. Allaah says (interpretation of the meaning):
“Tell the believing men to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts). That is purer for them. Verily, Allaah is All‑Aware of what they do”
Looking at pictures of naked children is in most cases inevitably accompanied by desire. Shaykh al-Islam ibn Taymiyah (may Allaah have mercy on him) narrated that the scholars were unanimously agreed that it is haraam to look at a boy’s face if that involves desire. He (may Allaah have mercy on him) said: A handsome, beardless boy is like a non-mahram woman in many cases, and it is not permissible to kiss him by way of pleasure, rather no one should kiss him but one who is safe from that, such as a father or brother.
And it is not permissible to look at them in this manner [i.e., with desire] according to consensus, rather it is haraam according to the majority to look at them if there is the fear of that.
End quote from al-Fataawa al-Kubra (3/202)
It is not permissible to look at pictures of naked children, and it is not permissible to look at their chests and faces if that is accompanied by desire.
See also the answer to question no. 94836.
And Allaah knows best.