Move duplicated code in home/sponsors out to new function, fixes non-image sponsor issue