Clean up of largest image finder

Split a long method and add error detection/handling when remote image
cannot be retrieved.