In fact, as long as you are in a regular hospital, prior and higher doctors explain the situation, they will not publish your photo, which violates the doctor's professional ethics, but also violates your right to a portrait. Now, as a doctor is still very careful about this kind of thing, one is to protect the patient, but also to protect themselves.
And now, if a regular hospital needs to release some photos, it is customary to blindfold patients to protect their privacy.
In fact, you don't have to worry about such things, if you still don't feel confident you can bring a blindfold or something like that yourself.