AvatarSelector: Improve error handling

Enable loading images <100px and add multiple fail-safes
2 jobs for master in 7 minutes and 58 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
failed #21352
code-quality

00:05:33

 
  Build
passed #21353
linux

00:02:25

 
Name Stage Failure
failed
code-quality Test
        if width <= 0 or height <=0:
^^ (bad-whitespace)
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=linux pid=11447 revision=943fc252 version=13.7.0
WARNING: coverage.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit status 1