Add gravatar filter.
Use filter gravatar instead of foreach.