Announcement

Collapse
No announcement yet.

SVG Image Photo preview displaying issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SVG Image Photo preview displaying issue

    Anyone use SVG for their EspoCRM and image upload?

    Some of my SVG file does not display in the preview, but it is visible when you are in the Edit/Upload view. Not all SVG have this issue, I try re-saving the file with Inkscape but it doesn't change anything.

  • #2
    Hi esforim,

    Could you send us a screenshot with the settings of the field in which you upload an image with the .SVG format, as well as the file itself, with which you have problems viewing the preview?

    Comment


    • esforim
      esforim commented
      Editing a comment
      Hi lazovic, I will send you a PM of the image as it is a logo belong to a 3rd party company. As for the field setting, will send it in the next post.

  • #3
    Click image for larger version

Name:	image.png
Views:	192
Size:	51.3 KB
ID:	87274

    Here is the image field.

    Comment


    • #4
      I've had a similar SVG issue before. It can be frustrating when some files don't display properly. In my case, checking the SVG code for any glitches sometimes helped. Also, here's a service (https://www.frameshop.com.au/custom-picture-frames/) where you can print out all the files you need. I hope that helps! Hang in there!
      Last edited by rachelstellar; 09-27-2023, 12:03 PM.

      Comment


      • #5
        Most likely, the problem is in the file itself. Because I successfully uploaded the image with .svg format and it displays correctly everywhere. In your situation, it is easier to use a converter program, and save the file in .png, and then upload it to your field with the Image type.
        Attached Files

        Comment


        • #6
          rachelstellar victor

          Hi guys, it not all SVG that causes it. I guess it could be some compatibility issue, I also tried making small edit and save as a new SVG using inkscape but no luck. As the SVG got a business name and logo I can't post it here.

          I prefer to keep using SVG if possible due to low file size and the 'vector'ness of the file than to downgrade the quality by using PNG (which I did for any file that have the issue).

          Perhaps once I find a problematic files that doesn't have branding/logo I will post it for diagnose.

          Comment


          • #7
            This is because of Content Security Policy we have applied in the image entry point. SVG with data: source won't be displayed as otherwise there will be an XSS vulnerability.

            Comment


            • esforim
              esforim commented
              Editing a comment
              Anyway to re-save it without data:Source?
          Working...
          X