Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Urvish 252 posts 776 karma points
    Apr 15, 2015 @ 08:40
    Urvish
    0

    SVG image not previewing in Content page

    Hi,

    I am working in Umbraco 7.2.2 website.

    I have enable svg image uploading through media setting in UmbracoSetting.config file.

    But when I try to select that image from content page , I am not able to see which image selected?

    enter image description here

    Can anyone help?

    Thanks in advance.

    Regards,

    Urvish Mandaliya

  • Mehul Gajjar 48 posts 172 karma points
    Apr 15, 2015 @ 08:43
    Mehul Gajjar
    0

    Hi 

    I am facing same issue in Umbraco 7.2.4 ,

    Kindly let me know if you find any solution.

    Regards

    Mehul.

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Apr 15, 2015 @ 09:25
    Alex Skrypnyk
    0

    Hi,

    Umbraco can't show thumb of svg image.

    Thanks

  • Urvish 252 posts 776 karma points
    Apr 15, 2015 @ 09:32
    Urvish
    0

    Hi Alex,

    Thanks for the reply.

    Is there any work around to display that image?

    Regards,

    Urvish Mandaliya

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Apr 15, 2015 @ 09:43
    Alex Skrypnyk
    1

    You need to write your custom property editor for svg

    http://umbraco.github.io/Belle/#/api

  • Urvish 252 posts 776 karma points
    Apr 15, 2015 @ 09:49
    Urvish
    0

    ok thanks Alex.

    I will try with this.

    Regards,

    Urvish Mandaliya

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Apr 15, 2015 @ 10:09
    Alex Skrypnyk
    1

    Another possible problem, that IIS does not understand what a .svg file is and will not serve any files that have been added by a designer or front end developer.

    Try to add to web.config

    <staticContent>
      <remove fileExtension=".air" />
      <mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
      <remove fileExtension=".svg" />
      <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      <remove fileExtension=".ttf" />
      <mimeMap fileExtension=".ttf" mimeType="font/ttf" />        
    </staticContent>
    

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 15, 2015 @ 10:30
    Jan Skovgaard
    1

    Yup, you'll also need to add the mime type stuff in the web.config otherwise there is a chance that the server is getting confused.

    I usually get some inspiration about what to add to staticContent from this config from the html5 boilerplate team https://github.com/darktable/html5-boilerplate-server-configs/blob/master/web.config

    /Jan

  • Urvish 252 posts 776 karma points
    Apr 15, 2015 @ 11:03
    Urvish
    0

    Thanks Alex and Jan for the reply.

    I have checked in web.config file.

    Mime type for svg is already added in that.

    <remove fileExtension=".svg" />
    <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
    

    Regards,

    Urvish Mandaliya

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 15, 2015 @ 11:42
    Jan Skovgaard
    1

    Hi Urvish

    You might also want to add this if for some reason compressed svg's are being uploaded.

      <remove fileExtension=".svgz" />
      <mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />
    

    /Jan

  • Urvish 252 posts 776 karma points
    Apr 17, 2015 @ 07:44
    Urvish
    0

    Thanks for the reply Jan.

    Added that but result remains same :(

    Regards,

    Urvish Mandaliya

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Apr 17, 2015 @ 10:17
    Alex Skrypnyk
    0

    So you have to write your own property editor.

    Thanks

  • Bipin Kataria 29 posts 60 karma points
    Jul 26, 2016 @ 01:39
    Bipin Kataria
    0

    If you want thumbnail in Media section for SVG file, just add below code in umbracoSettings.config > Content tag:

    <imaging>

    <!-- what file extension that should cause umbraco to create thumbnails -->

    <imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif,svg</imageFileTypes>

    </imaging>

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Aug 17, 2016 @ 16:45
    Alex Skrypnyk
    0

    Hi,

    Umbraco 7.5 just released and SVG image preview is out of the box now - http://issues.umbraco.org/issue/U4-8580#

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft