Fixed avatar loading

Code was in the wrong place and only fetching gravatars on posts with
images