There are at least two options for rendering portraits in JSP:
<img src="<%= themeDisplay.getPathImage()%> /image_gallery?img_id=<%= image.getImageId()%>&t= <%= ImageServletTokenUtil.getToken(image.getImageId())%>"> <img src="<%= themeDisplay.getPathImage() %>/user_portrait?img_id=<%=id %>">
The first approach contains an additional security aspect based on a security market that you may or may not find to suit your needs.
source share