Avoiding looking at sinful images and impure areas:
A woman is to be especially careful throughout her pregnancy not to go to impure areas which are filled with sin and transgression. She should likewise not look at any such areas and should only look at matters of purity. [Accordingly, a pregnant woman is especially to avoid looking at sinful and prohibited images. She should avoid walking by a church, or other house of idolatry.] The reason for this is because her fetus likewise sees the images and understands the lust for sin involved in it. This can cause the evil inclination to enter the child earlier than expected and prevent him from properly progressing in the service of God. For this reason, a woman is to especially avoid sin throughout her pregnancy.
Looking at holy images:
Throughout her pregnancy, a woman is to try to see holy images. She should visit the synagogues and halls of study and see and hear the Torah discussions of the Torah scholars and righteous men. These words of Torah will enter into her ears and sanctify the child that is within her, as the fetus hears and understands everything. So was done by the mother of Rebbe Yehoshua Ben Chanania when she was pregnant with him and for this reason she had a very holy child who was a great Torah scholar.
A woman is to avoid looking at impure, Non-Kosher, animals throughout her pregnancy. This likewise applies after the birth, but she is to be careful not to show her child nonkosher imagery. [Accordingly, some write that a pregnant woman should not visit a zoo in order so she does not see nonkosher animals that can have an effect on her fetus.]
Listening to words of Torah:
Hearing words of Torah has a great impact on the soul of the child from the moment that he is born. After The mother of Rebbe Yehoshua Ben Chanania gave birth to him she permanently placed his crib in the hall of study to him for him to only hear words of Torah, and for this reason she had a very holy child who was a great Torah scholar.
 See Mavor Yabok Mamar Sifsei Tzedek 5; Yerushalmi Yevamos 1:6 with Rebbe Yehoshua Ben Chananya; Shevet Hamussar 24; Tur Y.D. 305; Bach 305; Toras Menachem 5750 3:179 “it is none the custom of women while they are pregnant to be very careful not to see impure items but rather only pure and holy items”; Nitei Gavriel 56:6; Shevach Habris 1:10
 Shevet Hamussar 24; Toras Menachem 5750 3:179 “it is none the custom of women while they are pregnant to be very careful not to see impure items but rather only pure and holy items”; Shevach Habris 1:25
 See Yerushalmi Yevamos 1:6; Rashi and Rav Ovadia Bartenura on Avos 2:8
 Kav Hayashar 2; Shevet Hamussar 24; Yeshuos Chochmah 33:11; Sefer Zechira; Sichos Kodesh Parshas Kedoshim 2:170; Hisvadyus 1984 20th Marchesvan 37; Toras Menachem 5750 3:179 “it has been spoken a number of times on the need to be careful not to look at toys and pictures of nonkosher animals in order so children only see pure and holy things. This is so important that this adherence begins as soon as the child is born and comes out to the air the world, in which case we immediately hang around the child matters of holiness and purity. Furthermore, this adherence begins even before the child is born during the pregnancy. As it is known that the custom of women while they are pregnant to be very careful not to see impure items but rather only pure and holy items”; Sefer Shemiras Haguf Vihanefesh [Lerner] 237:2; See Megillah 28a; Shulchan Menachem 6:31; Shevach Habris 1:11
 The reason: As everything a child sees, even from a young age, is encrypted in his mind, and hence it is proper to abstain them from seeing anything which can ignite their Yetzer Hara when they are older. [see Kav Hayashar 2; Hisvadyus 1984 20th Marchesvan 37]
 Chosen Yeshuos p. 86 in name of Rebbe; Shevach Habris 1:11
 See and Rav Ovadia Bartenura on Avos 2:8; Yerushalmi Yevamos 1:6