<article class="articleEmbeddedEntry embeddedContent" aria-labelledby="{$titleHash}_entryTitle{@$article->articleID}">
<div class="embeddedContentLink">
- <div class="embeddedContentImage" style="background-image: url({if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailLink('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoURL()}{/if})"></div>
+ <img
+ class="embeddedContentImageElement"
+ src="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailLink('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoURL()}{/if}"
+ height="{if $article->getTeaserImage()}{@$article->getTeaserImage()->getThumbnailHeight('medium')}{else}{@$__wcf->getStyleHandler()->getStyle()->getCoverPhotoHeight()}{/if}"
+ width="{if $article->getTeaserImage()}{@$article->getTeaserImage()->getThumbnailWidth('medium')}{else}{@$__wcf->getStyleHandler()->getStyle()->getCoverPhotoWidth()}{/if}"
+ loading="lazy"
+ alt="">
<div class="embeddedContentCategory">{lang}wcf.article.bbcode.type{/lang}</div>
overflow: hidden;
}
+/* @deprecated 5.4 Use `<img class="embeddedContentImageElement">` instead */
.embeddedContentImage {
background-position: center;
background-repeat: no-repeat;
min-height: 150px;
}
+.embeddedContentImageElement {
+ margin: -10px -10px 10px -10px;
+ object-fit: cover;
+ object-position: center;
+}
+
+/* This repetition is required because of `.messageBody > .messageText img`. */
+.embeddedContentImageElement.embeddedContentImageElement.embeddedContentImageElement {
+ height: 150px !important;
+
+ // The `100% + 20px` are the result of the negative margins.
+ max-width: calc(100% + 20px);
+}
+
.embeddedContentLink {
display: block;
padding: 10px;