DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

SVG in <img>

Sort:
You are not authorized to post a reply.





New Around Here





    Hello,

    When adding an SVG to an < img />, publishing the page, returning to edit the page, and opening the HTML editor of CKEditor the < img /> is no longer there. The image does show when looking at the page after initially adding it. Is it not supported to use SVGs in this manner? I am able to use them in. Is there any way to get this to work in the < img />?

    Thanks,

    J.






    Veteran Member





      Check in Host Settings to make sure that svg files are allowed.
      Joe Craig
      DNN MVP
      Patapsco Research Group





      New Around Here





        Hi Joe,
        I do see svg in the "Allowable File Extensions" list. Could there be another reason it is stripped in < img /> elements? It is able to be added using < object> with no problems, but unfortunately my client has been requested to have it as < img />.
        Thanks,
        J.






        Veteran Member





          If you open Site Assets, are the svg files visible there?
          Joe Craig
          DNN MVP
          Patapsco Research Group





          New Around Here





            Yes, I can see them in the "Site Assets" pane.





            Veteran Member





              Hmmm. Is there a setting for CK Editor that's out of whack. Sorry for the use of that technical term.

              I'm somewhat at a loss.

              What does CKE window show where the image should be?
              Joe Craig
              DNN MVP
              Patapsco Research Group





              Veteran Member





                I just checked a 9.3.2 site. I added an svg file and can see it in Site Assets, but not in the Image Manager when I try to edit an HTML module.
                Joe Craig
                DNN MVP
                Patapsco Research Group





                Veteran Member





                  The CKEditor documentation says the svg files are not allowed by default, but that can be modified. I haven't found anything in the HTML Editor Profider settings, though. Still looking.
                  Joe Craig
                  DNN MVP
                  Patapsco Research Group





                  New Around Here





                    Hi Joe,
                    Had some trouble logging in for a while. Were you able to find anything else out? I tried adding "SVG" to the allowed content in the CKEditor settings, but it did not seem to do anything. I also checked to be sure that it was not added to the unallowed content. Just for kicks I did a Fiddler trace to see if anything showed up, but found nothing of value there.

                    Thanks for your continued help with this issue!

                    J.





                    New Around Here





                      I had the same issue. I need to enter the svg in Advanced Editor otherwise it will automaticaly got wipe out.

                      You are not authorized to post a reply.

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved