用于 SVG 图像的 FluidTYPO3 vhs 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 图像。嗯?
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
中没有向量吗?
<IfModule mod_mime.c>
...
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
...
</Ifmodule>
编辑:我也尝试了 Fluid ViewHelper,但 SVG 图像有 height/width = 0
:
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
编辑 2:ImagePath 正确。在开发人员工具中,我 "see" 图片 ..
编辑 3:哦,我在我的文件管理器 (FAL) 看到 0x0 pixels
..
谢谢merec。
使用 SVG 图像/TYPO3 6.2 和 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" />
我使用 TYPO3 CMS 6.2.14、vhs 2.3.3
、Flux 7.2.1
和 FluidContent 4.3.1
- 我的 TYPO3 编辑器需要通过 vhs
-ViewHelper 上传 SVG 图像的机会.我制作了一个新的 FluidTYPO3 内容元素 (FCE),但前端没有可见的 SVG 图像。嗯?
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
中没有向量吗?
<IfModule mod_mime.c>
...
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
...
</Ifmodule>
编辑:我也尝试了 Fluid ViewHelper,但 SVG 图像有 height/width = 0
:
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
编辑 2:ImagePath 正确。在开发人员工具中,我 "see" 图片 ..
编辑 3:哦,我在我的文件管理器 (FAL) 看到 0x0 pixels
..
谢谢merec。
使用 SVG 图像/TYPO3 6.2 和 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" />