0

I have problems with managing svg images in TYPO3 backend and I have not found a valid solution via google.

I have uploaded an svg image via menu item datalist. I then added a new content element image only and opened "Images" in order to add the just uploaded svg image but I failed since svg images are not displayed in this directory-structure.

I have linked two images so that you can see what I am talking about. http://www.directupload.net/file/d/3711/liah4ed4_png.htm http://www.directupload.net/file/d/3711/3vhck8pa_png.htm

Is it possible that one can manage svg images via backend the same way as pngs, jpgs etc.? Doing that via TypoScript is not an option and including svg using content element html is not the favourite option.

I appreciate any help :)

AMartinNo1

2 Answers 2

5

In the install tool there is a value that can change the recognized image file extensions:

Add ,svgto the input field for [GFX][imagefile_ext]under "All configuration" -> "$TYPO3_CONF_VARS['GFX']"

If we don´t need to support IE8 this is a great option. (http://caniuse.com/svg-img) I do not have experience with SVG images in TYPO3 - but in a first test with imagemagic TYPO3(6.2) could create a thumbnail in the filelist for a .svg image. Sadly it failed to create a thumbnail in the fal-record-list of the image content element.

I once heard that SVG can even embed video. So be aware that if a SVG file works or not may depend on which features this file uses and what your server is capable of.

[SVG Support] Requires libxml2 and freetype2. Note that SVG is a very complex specification so support is still not complete. (from http://www.graphicsmagick.org/formats.html)

TYPO3 6.2 Install Tool - Image file extensions configuration

2
  • Sorry for the late response. We had to finish the project and there was a lot to do which leads to the result that I forgot this issue. Thanks for your response. We have the same issue - they can be uploaded but cannot be used in the FAL-List. I just checked it with TYPO3 v6.2.9 and is not fixed there.
    – Alexander
    Commented Mar 15, 2015 at 13:51
  • in my experience, i had to clear the cache and log out and in again for the changed setting to take effect after updating the setting in the Installtool.
    – mtness
    Commented Sep 25, 2019 at 12:41
-4

i did it the new way (TYPO3 6.2) via typoscript (i know this is not what you've asked for):

lib.logo = SVG
lib.logo {
    src = path/to/my/logo.svg
    width = 250
    height = 
    noscript.cObject = TEXT
    noscript.cObject.value = No SVG rendering possible, please use a browser.
    stdWrap.typolink {
        parameter = 3 _self
        ATagParams.data = LLL:fileadmin/templates/xml/locallang_tca.xml:feGoHome
        ATagParams.wrap = title="|" class="logo"
        ATagBeforWrap = 1
        wrap = |
    }
}

after that i only needed following css, for rendering svg images in responsive context in IE!

.header>a>object {
    height: auto;
    width: 100%;
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.