将旧的6.2系统更新到8.7.20后,图像裁剪失败,模板不是我编写的,我对这种方法不熟悉。感谢任何提示。
<div class="news-img-wrap">
<f:if condition="{newsItem.falMediaPreviews}">
<f:then>
<n:link newsItem="{newsItem}" settings="{settings}" title="{newsItem.title}">
<f:alias map="{mediaElement: newsItem.falMediaPreviews.0}">
<f:if condition="{mediaElement.originalResource.type} == 2">
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="{f:uri.image(src:'{mediaElement.uid}',treatIdAsReference:'1',width:'360c',height:'140c')}" media="(min-width: 768px)">
<source srcset="{f:uri.image(src:'{mediaElement.uid}',treatIdAsReference:'1',width:'720c',height:'330c')}" media="(max-width: 767px)">
<!--[if IE 9]></video><![endif]-->
<img src="{f:uri.image(src:'{mediaElement.uid}',treatIdAsReference:'1',width:'360c',height:'140c')}" alt="{mediaElement.originalResource.alternative}" title="{mediaElement.originalResource.title}">
</picture>
<f:comment><f:image src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.originalResource.title}" alt="{mediaElement.originalResource.alternative}" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" /></f:comment>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:render partial="Detail/FalMediaVideo" arguments="{mediaElement: mediaElement}" />
</f:if>
</f:alias>
</n:link>
</f:then>
<f:else>
</f:else>
</f:if>
</div>