span.gravatar {display: inline-block;}
select.filterUser option { padding-left: 20px; background-repeat: no-repeat; height: 16px; }
<?php
$sizes = [
    'small' => 16,
    'medium' => 36,
    'big' => 128,
];
foreach ($sizes as $name => $size) {
    echo 'span.gravatar.' . $name . '{width: ' . $size . 'px; height: ' . $size . 'px;}' . PHP_EOL;
}
foreach ($this->users as $user) {
    $urlBase = 'https://secure.gravatar.com/avatar/' . md5(trim(mb_strtolower($user->email))) . '.jpg?default=identicon';
    foreach ($sizes as $name => $size) {
        $url = $urlBase . '&size=' . $size;
        $additionnalSelector = $name == 'small' ? ", select.filterUser option[value='" . $user->id . "']" : ''; ?>
span.gravatar.user_<?php echo $user->id; ?>.<?php echo $name . $additionnalSelector; ?> {background-image: url(<?php echo $url; ?>);}
<?php
    }
}

span.gravatar {display: inline-block;}
select.filterUser option { padding-left: 20px; background-repeat: no-repeat; height: 16px; }
<?php
$sizes = [
    'small' => 16,
    'medium' => 36,
    'big' => 128,
];
foreach ($sizes as $name => $size) {
    echo 'span.gravatar.' . $name . '{width: ' . $size . 'px; height: ' . $size . 'px;}' . PHP_EOL;
}
foreach ($this->users as $user) {
    $urlBase = 'https://secure.gravatar.com/avatar/' . md5(trim(mb_strtolower($user->email))) . '.jpg?default=identicon';
    foreach ($sizes as $name => $size) {
        $url = $urlBase . '&size=' . $size; ?>
span.gravatar.user_<?php echo $user->id; ?>.<?php echo $name; ?> {background-image: url(<?php echo $url; ?>);}
<?php
    }
}

Drop selectbox CSS style because not supported in Firefox anymore
Drop selectbox CSS style because not supported in Firefox anymore
