1. Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.
    Dismiss Notice

Support for the SVG format

Discussion in 'Professional Support' started by nofc_fro, Aug 7, 2018.

  1. nofc_fro

    nofc_fro Member

    Level: Professional
    Hi,
    I want to insert a logo in the PDF file of the list. With the "jpg" and "png" formats I have no problems, I tried instead to insert the logo.svg and it is not displayed. Is there a support for the SVG format?
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    It's working on my site (tested with details PDF with a textarea element).
    Did you add the svg extension to "Legal Extensions (File Types)" in Joomla's Media Options?
     
  3. nofc_fro

    nofc_fro Member

    Level: Professional
    Yes, I did but I have this error:

    Error
    Illegal mime type detected: text/html

    My test site is http://nofc.joomla.com/
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Looks like you hadn't added image/svg+xml to the "Legal MIME Types" (just below "Legal Image Extensions".

    I logged in to your site and added it.

    Let me know if that fixes it.

    -- hugh
     
  5. nofc_fro

    nofc_fro Member

    Level: Professional
    I saw that added the string, however if I load a continuous svg file to have the same error message, did you accidentally try to load a svg file?

    >> https://seocrate.it/problem/test.svg

    [​IMG]
     
    Last edited: Aug 22, 2018
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    This is during upload (although I don't understand why).
    You may try to
    - upload via e.g. FTP
    or
    - set the "Restrict uploads"=no (temporarily)
    and see if you can use it in your PDF.
     
  7. nofc_fro

    nofc_fro Member

    Level: Professional
    Ok ;)
    I added the svg file via FTP, so I replaced the new path in the custom template. The jpg file was displayed correctly, but the svg file was not.
    http://nofc.joomla.com/print-list
     
    Last edited: Aug 22, 2018
  8. troester

    troester Well-Known Member Staff Member

    Level: Community
    On my site I also have issues with uploading svg (via Joomla media or JCE editor).
    But after upload via FTP I can include it directly in a custom template or use it in the JCE editor (after adding svg as allowed file type there, too) and it's displayed in the browser and in the PDF...

    How did you include it in your template, with an absolute or a relative path?
     
  9. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    OK, turns out the uploading of SVG is a known problem in J! ...

    https://github.com/joomla/joomla-cms/issues/16795

    ... because there's a line in the media manager code that blocks any MIME type that has 'xml' in it, which SVG does (image/svg+xml). In typical J! fashion they've spent four years arguing the finer points of potential solutions rather than just fixing it. :)

    -- hugh
     
    Last edited: Aug 23, 2018
  10. nofc_fro

    nofc_fro Member

    Level: Professional
    Yes I read the discussion about SVG files ... on Wordpress this problem is not there (there is a plugin that takes care of checking if SVG files are safe) :(
    However, I used a relative path and an absolute path, but I have not solved :(

    echo "<img src='http://nofc.joomla.com/images/logo.svg' alt='logo'>";
     
  11. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Dunno what's going on there. But it's not a Fabrik issue, so I can't really help.

    Just FYI, I can access an SVG file locally, in my images folder. Maybe you have something in your htaccess which is causing problems?

    -- hugh
     
  12. nofc_fro

    nofc_fro Member

    Level: Professional
    No, the .htaccess file is the original one. The svg file in other parts of Joomla is displayed correctly. However it is not a problem, I will use a png file ;)
     

Share This Page