簡體   English   中英

TYPO3流體f:沒有寬度/高度屬性的圖像/ f:uri.image問題

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM