FluidTYPO3与SVG图像的ViewHelper? [英] FluidTYPO3 vhs ViewHelper for SVG Images?
问题描述
我使用TYPO3 CMS 6.2.14,vhs 2.3.3
,Flux 7.2.1
和FluidContent 4.3.1
-我的TYPO3编辑器需要有机会通过vhs
-ViewHelper上传SVG图像.我创建了一个新的 FluidTYPO3 内容元素(FCE),但是前端没有可见的SVG图像.嗯?
I use TYPO3 CMS 6.2.14, vhs 2.3.3
, Flux 7.2.1
and FluidContent 4.3.1
- my TYPO3 Editor need the opportunity to upload SVG-Images via vhs
-ViewHelper. I've made a new FluidTYPO3 Content Element (FCE), but there's no SVG Image visible in frontend. Mmhh?
Flux-FlexForm
Flux-FlexForm
<flux:field.file name="imgIcon" allowed="jpg,gif,png,jpeg,svg" uploadFolder="uploads/tx_myext" minItems="0" maxItems="1" size="1" />
...
<v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" />
输出
<div class="small-2 columns">
<img alt="Icon" src="" width="" height="">
</div>
我也使用htaccess条目,但没有成功.我的错在哪里此ViewHelper是否需要height
和width
? vhs
中没有可用的向量吗?
Also I use the htaccess entry, but there is no success. Where's my fault? Do I need height
and width
for this ViewHelper? Aren't vectors availible in vhs
?
<IfModule mod_mime.c>
...
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
...
</Ifmodule>
我也尝试了Fluid ViewHelper,但是SVG图像具有height/width = 0
:
I also tried the Fluid ViewHelper, but the SVG Image has height/width = 0
:
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
ImagePath是正确的.在开发人员工具中,我看到"了图像..
EDIT 2: The ImagePath is correct. At Developer Tools I "see" the Image ..
哦,我在Filemanager(FAL)中看到0x0 pixels
..
EDIT 3: Oh, I see at my Filemanager (FAL) 0x0 pixels
..
推荐答案
感谢 merec .
将SVG图像/TYPO3 6.2与FluidTYPO3一起使用
Use SVG Images / TYPO3 6.2 with FluidTYPO3
答案:使用
<img src="{f:uri.image(src: 'uploads/tx_myext/{imgIcon}')}">
代替
<v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" />
// OR
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
这篇关于FluidTYPO3与SVG图像的ViewHelper?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!