For starters, you might want to check out this question about noticing spellcasting, and/or this Sage Advice mentioned by @DavidCoffron in a comment.
Beyond that, and in case you desire a way to telegraph the fact that the portrait is animate, I will tell you what I did for my game, since my players actually encountered that creature.
About the portrait itself:
Chapter 4: Castle Ravenloft, Room K47, P. 69-70
"The portrait on the wall depicts Strahd von Zarovich before he became a vampire. Even in life, he was pale. The eyes of the portrait seem to watch and follow the characters as they explore the area. The picture frame is bolted to the wall and can't be removed without destroying it."
So from that, when combat was initiated, and the portrait began casting spells, I had simply made the picture portion animated, like a Harry Potter picture. The image of Strahd was actually gesturing and speaking.
The adventure book, however, does not present a way. It's completely up to the DM, and I found that being straightforward and to-the-point was effective for me and my group: "The thing is casting at you, dangit."
Ultimately, as a DM, it's up to you to decide if and how the players discover it.