Default avatar if link is broken
| After Width: | Height: | Size: 34 KiB | 
| After Width: | Height: | Size: 63 KiB | 
| After Width: | Height: | Size: 34 KiB | 
| After Width: | Height: | Size: 47 KiB | 
| After Width: | Height: | Size: 117 KiB | 
| After Width: | Height: | Size: 48 KiB | 
| After Width: | Height: | Size: 26 KiB | 
| After Width: | Height: | Size: 24 KiB | 
| After Width: | Height: | Size: 40 KiB | 
| After Width: | Height: | Size: 148 KiB | 
| After Width: | Height: | Size: 52 KiB | 
| After Width: | Height: | Size: 9.0 KiB | 
| After Width: | Height: | Size: 55 KiB | 
| After Width: | Height: | Size: 74 KiB | 
| After Width: | Height: | Size: 92 KiB | 
|  | @ -206,16 +206,22 @@ def getAvatarImageHtml(showAvatarOptions: bool, | |||
|                        nickname: str, domainFull: str, | ||||
|                        avatarUrl: str, postActor: str, | ||||
|                        translate: {}, avatarPosition: str, | ||||
|                        pageNumber: int, messageIdStr: str) -> str: | ||||
|                        pageNumber: int, messageIdStr: str, | ||||
|                        iconsPath: str) -> str: | ||||
|     """Get html for the avatar image | ||||
|     """ | ||||
|     # if the image link is broken then this provides a local substitute | ||||
|     brokenLinkSubstitute = \ | ||||
|         " onerror=\"this.onerror=null; this.src='" + \ | ||||
|         iconsPath + "/avatar_default.png'\"" | ||||
| 
 | ||||
|     avatarLink = '' | ||||
|     if '/users/news/' not in avatarUrl: | ||||
|         avatarLink = '        <a class="imageAnchor" href="' + postActor + '">' | ||||
|         avatarLink += \ | ||||
|             '    <img loading="lazy" src="' + avatarUrl + '" title="' + \ | ||||
|             translate['Show profile'] + '" alt=" "' + avatarPosition + \ | ||||
|             '/></a>\n' | ||||
|             brokenLinkSubstitute + '/></a>\n' | ||||
| 
 | ||||
|     if showAvatarOptions and \ | ||||
|        domainFull + '/users/' + nickname not in postActor: | ||||
|  | @ -227,13 +233,15 @@ def getAvatarImageHtml(showAvatarOptions: bool, | |||
|             avatarLink += \ | ||||
|                 '        <img loading="lazy" title="' + \ | ||||
|                 translate['Show options for this person'] + \ | ||||
|                 '" src="' + avatarUrl + '" ' + avatarPosition + '/></a>\n' | ||||
|                 '" src="' + avatarUrl + '" ' + avatarPosition + \ | ||||
|                 brokenLinkSubstitute + '/></a>\n' | ||||
|         else: | ||||
|             # don't link to the person options for the news account | ||||
|             avatarLink += \ | ||||
|                 '        <img loading="lazy" title="' + \ | ||||
|                 translate['Show options for this person'] + \ | ||||
|                 '" src="' + avatarUrl + '" ' + avatarPosition + '/>\n' | ||||
|                 '" src="' + avatarUrl + '" ' + avatarPosition + \ | ||||
|                 brokenLinkSubstitute + '/>\n' | ||||
|     return avatarLink.strip() | ||||
| 
 | ||||
| 
 | ||||
|  | @ -1211,7 +1219,8 @@ def individualPostAsHtml(allowDownloads: bool, | |||
|                            nickname, domainFull, | ||||
|                            avatarUrl, postActor, | ||||
|                            translate, avatarPosition, | ||||
|                            pageNumber, messageIdStr) | ||||
|                            pageNumber, messageIdStr, | ||||
|                            iconsPath) | ||||
| 
 | ||||
|     avatarImageInPost = \ | ||||
|         '      <div class="timeline-avatar">' + avatarLink + '</div>\n' | ||||
|  |  | |||