I would keep it to the website, where people have to go looking for the information if they want it. And, I wouldn't make it essential information--guests should know that this will be a casual afternoon outdoor wedding (or whatever) just from reading the invitation and/or looking up the location. But, there's no reason one can't have some fun with the wedding website--they can be very dry and utilitarian sometimes, when I think a lot of people go to them hoping to learn something more about the wedding and the people in it.
So I would try to set it up so that some people can look at the invitation info and go, "Okay, I should wear X and Y, but not Z," and they're done. But then other people might go to the wedding website "for more information," and one tab would be about clothes, and they could see that and realize, "Oh, they're thinking X and Y, but not Z! I totally didn't pick up on that before."
Personally it probably wouldn't be very useful for me, though it might be fun for me to look at. I don't own a lot of different clothes, especially dressy clothes; I tend to wear about the same thing to all "nice" occasions, and sometimes I end up a little overdressed, other times a little underdressed. Never been invited to something that required ballgown-level clothes, though, fortunately! A description of the location and activities would probably be more useful to me in deciding what to wear, or rather deciding if I needed to modify my usual choice for "nice" occasions, since it's unlikely that any "what to wear" pictures would include things I happened to already own.