.msgBgById (@msgBgAuthorId; @msgBgUrl; @msgBgSize; @msgBgPosition: false) {
.message[data-author-id="@{msgBgAuthorId}"] .message-inner {
background-image: linear-gradient(to top, @xf-contentBg, fade(@xf-contentBg, 60%)), url(@msgBgUrl);
background-position: @msgBgPosition;
background-size: @msgBgSize;
}
.message[data-author-id="@{msgBgAuthorId}"] .message-cell.message-cell--user {
background: transparent;
}
}
// Example
.msgBgById (1; 'https://i.imgur.com/W1yqxKS.jpg'; cover; left);