Code to thumbnail payment icon image had an error for python3 because from RPC the image would be a text string instead of an expected bytestring. This change accepts both and made another small fix in the view since image_medium doesn't exist (and image is already thumbnailed). A third fix was that removing an image caused an error. opw-803722 closes #22088