the clothes that she was wearing in that photo was modest in my opinion, but also fit tightly. As such, it is hard to buy that the female teacher  would be after her for that. As such, I took an EDUCATED guess and not just assumed things like others, including yourself, did. 

As to what a teacher should tell as student, they absolutely should have the right to comment on it. They are, like parents, working hard to get a child ready for the real world. Far too many on the right will gripe that teachers are not teaching their kids well enough, but then turn right around and gripe that the teacher has overstepped their boundaries. Basically, it is the far right's BS that is causing the many issues for our schools. U and others like you, want to control everything, while doing or paying as little as possible

So, no, I think that the teacher was within her bounds to comment. 
As to shaming:
https://www.google.com/search?q=shaming+definition
Nothing the teacher said, was wrong or shaming