Chazal instituted certain guidelines relating to appropriate reading materials on Shabbos; one of these restrictions is reading the captions under tzuros udyukna’os (paintings or images), as is brought in the Gemara Shabbos. With regard to gazing at the dyukna (image) itself, the Gemara continues, this is forbidden even during the week, mishum shene’emar “al tifnu el ha’elilim” (on account of the verse [with the Torah prohibition] “Do not stray after idols”).
Quoting this Gemara, Rishonim, posit a range of issurim (prohibitions); each opinion is based on a different interpretation of the pasuk (verse). According to some authorities, this issur refers specifically to portraits that were created for the purpose of avodah zarah (idol worship). Others state that the word elilim can also be interpreted as “inanities.” These poskim state that even an image or visage that is meant to serve only for decoration is restricted as it causes mefaneh libo l’vatalah (directing one’s heart towards emptiness), distracting a person from their main pursuit of avodas Hashem (service of G-d).
Nevertheless, halachah concludes that pictures and portraits that are not meant for avodah zarah are not prohibited—and indeed people commonly view (and hang) innocuous pictures and portraits. Poskim add, however, that a yarei d’var Hashem (one who [particularly] fears the word of G-d) would refrain from gazing at these images, except in cases where there it brings to’eles (purpose) to their avodas Hashem.
The Gemara tells of Rav Menachem ben Rav Sima’i who earned the title of Benan shel Kedoshim (son of holy [people]) due to his diligence in this particular matter—he never looked at the surface of a coin because of the image engraved on it. This anecdote indicates that “normal” people need not be scrupulous about this, say the commentaries. Even those poskim who restrict gazing at all images (including those that don’t represent avodah zarah) would allow this, since the portraits on coins are so commonly at hand, they would not be the cause of distraction from Torah and mitzvos.
The Magen Avraham (17th century halachic commentator) states that even the poskim who include all images in the prohibition refer to contemplating the image and not just looking at a picture or portrait in passing.