Get map images from portal_url not in actual context + pep8 fixes refs #4868