我在让{f:uri.image}
工作时遇到了一些困难,这并不表示:
<img src="{f:uri.image(src:person.firstImage,treatIdAsReference:1, width:150c,height:150c,cropVariant:'square')}"/>
person.firstImage
是TYPO3\CMS\Extbase\Domain\Model\FileReference
型的。
也许你发现了错误?
另一方面,这起作用是:
<f:image class="image-author" image="{person.firstImage}" width="150c" height="150c" cropVariant="square"/>
..。但是,输出将始终具有width="150" height="150"
html属性,这将与响应性CSS冲突。
是否有一种方法可以防止f:image
输出源标记中的高度和高度?也许不会,如果我看看VH
发布于 2017-11-30 11:56:41
添加c
时,需要转义宽度和高度
<img src="{f:uri.image(src:person.firstImage,treatIdAsReference:1, width:'150c',height:'150c',cropVariant:'square')}"/>
还将采取下列行动:
<img src="{f:uri.image(image:person.firstImage,width:'150c',height:'150c',cropVariant:'square')}"/>
https://stackoverflow.com/questions/47572769
复制相似问题