我遇到一些麻烦,让{f:uri.image}
工作,这不会呈现:
<img src="{f:uri.image(src:person.firstImage,treatIdAsReference:1, width:150c,height:150c,cropVariant:'square')}"/>
person.firstImage
是类型TYPO3CMSExtbaseDomainModelFileReference
。
也许您发现错误?
另一方面,这有效:
<f:image class="image-author" image="{person.firstImage}" width="150c" height="150c" cropVariant="square"/>
...但随后输出将始终具有width="150" height="150"
HTML属性,这将与响应式CSS冲突。
有没有办法防止f:image
输出和源标签中的高度?可能不是,如果我看VH?
添加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')}"/>