In JSP, it is possible to render a user portrait using this tag:
<liferay-user:user-portrait size="xl" user="<%= user %>"/>
However, that size attribute is effectively ignored by improper concatenation in the related UserPortraitTag.java:
sb.append("<span class=\\"rounded-circle sticker sticker-primary");
if (Validator.isNotNull(size)) {
sb.append(\_getSizeCssClass(size));
}
Because that size part is not separated by a space, it is merged with preceding part, thus creating non-existing class, e.g.: sticker-primarysticker-xl, so the default size is used instead.