Another option, which could be done is have an option to select the Gravatar from the option list with a value of "avatars/gravatar.jpg." Then, anywhere the avatar is displayed, then do something like this (psuedo code):
If avatar = "gravatar.jpg" then
generate Gravatar Image URL from e-mail in profile
end if
Then there is no possibility of malicious code being stored in the database, since gravatar.jpg passes the filter, and there is no need for additional fields. All we are doing, in this case, is make a substitution.
(Be sure to read my post on the previous page as well.)