Do you need to drink milk to get vitamin D?

No. Milk does not naturally contain vitamin D. It's added voluntarily as a supplement.

Your body makes vitamin D when your skin is directly exposed to the sun. That is why it is often called the "sunshine" vitamin. Most people meet at least some of their vitamin D needs this way. Your skin has a large capacity to make vitamin D. Just 10-15 minutes in the sun is the equivalent of taking between 15,000 and 20,000 IU's of Vitamin D, but without the potential for toxicity that is becoming more common as people take larger doses of it orally. there is a difference between Vitamin D synthesized from the sun and Vitamin D taken orally, since there are at least 5-10 additional photoproducts made in response to sun exposure that are not in the supplement form of Vitamin D. People who do not live in sunny places may not make enough vitamin D. Skin that is exposed to sunshine indoors through a window will not produce vitamin D. Cloudy days, shade, and having dark-colored skin also cut down on the amount of vitamin D the skin makes. If you don't get any sun exposure, you need to take a supplement to maintain healthy levels of 25-hydroxyvitamin D in your blood.

And don't forget that fish is also a food that contains vitamin D.