Change serve image route fn to handle request
Extract base-url creation