[英]TYPO3 fluid f:image without width/height attribute / f:uri.image issues
我在使{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 ?
添加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')}"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.