Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2933 by velo
28 Jun 2016, 12:06

we are using TYPO3 7.6 and Aimeos 16.4.3. We want to use SVG images for some icons in our attributes (Product/Attribute/Media). We are getting an error when we try to upload a SVG file.

Can we use SVG images somehow? Can we enable the upload of SVG images in the backend?

Thanks in advance!

Screenshot from 2016-06-28 13-55-13.png
Screenshot from 2016-06-28 13-55-13.png (37.66 KiB) Viewed 536 times
#2935 by aimeos
28 Jun 2016, 17:06
You can try to alter the allowed image types:

Maybe you have to set the configuration to NULL but I'm unsure how this is done with TypoScript. In PHP configuration file placed in an extension, this is possible.
#2943 by velo
06 Jul 2016, 12:42
Hey there,

the correct configuration to add more imagetypes in typoscript looks like this
Code: Select{
   0 = image/[someSUPPORTEDimageType]

BUT there's a major problem with image/svg+xml, aimeos uses gdlib which doesn't support svg. So adding svg as allowed type doesn't help here. The error message above isn't about allowed image types in aimeos, it says the underlying image lib doesn't support svg.
I'll try to fix the Message to something like "the image lib doesnt support the image type, supported types are ...." and make a pull request.

Greetings [pb]
#2947 by aimeos
06 Jul 2016, 22:03
Are you able to create a patch to extend the Media factory so image formats not supported by GD are returned as "application" objects?
#2948 by velo
07 Jul 2016, 06:51

I think a good idea would be to make it possible to use graphicsmagick (gm) for all the image stuff. It's more stable and much more formats are supported as you can see in this list:

Idea: Make this configurable so one can choose between gd and gm. So if you're okay with gd just do nothing but if you need support for more image types configure aimeos to use gm.

I'll take a look into the code to see what has to be done. I can't promise to release such a change. It depends on the time I have to invest.

#2949 by aimeos
07 Jul 2016, 07:15
That's a good idea. Are you able to create an alternative Implementation \Aimeos\MW\Media\Image\Gmagik class to support Gmagick? We would care about making it configurable.
#2992 by velo
13 Jul 2016, 08:34
Just for Information.
I'll take a look at this and implement a solution with gm(graphics magick) or im (image magick).
But for now there is so much work to do for me, so this project has to wait a little.
Sorry [pb]