Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Captive Portal fails to display images

    Captive Portal
    2
    3
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sgt_Josh
      last edited by

      Hi Guys,

      I'm just having some issues displaying svg files from my css file. The page is able to display without issues from my local workstation but not from the captive portal. Should I be able to display these files?

      Cheers
      Josh

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        @Sgt_Josh:

        Should I be able to display these files?

        SVG files on the portal page is a no-go.

        But ….. Google knows about it  ;)
        After visiting this : http://redmine.lighttpd.net/issues/991
        So, add

        ".svg" => "image/svg+xml",
        

        here : https://github.com/pfsense/pfsense/blob/master/etc/inc/system.inc#L1326

        Stop the Captive portal service - restart it - and svg extensions will be recognized now.

        Create a file named image.svg like this

        
          <title>Exemple simple de figure SVG</title>
          <desc>An image with a line, a circle and a square.</desc> 
        
          <rect width="100" height="80" x="0" y="70" fill="green"><line x1="5" y1="5" x2="250" y2="95" stroke="red"><circle cx="90" cy="80" r="50" fill="blue"><text x="180" y="60">A text</text></circle></line></rect> 
        

        and upload this image.svg file with the Captive Portal File Manager. Note that it got renamed like this captiveportal-image.svg when uploaded.

        Use this in your html portal code:

        <object type="image/svg+xml" data="captiveportal-image.svg" width="200" height="100">Your navigator can't interpret SVG files</object>
        

        Firefow showed me the svg 'image' on my captive portal page.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • S
          Sgt_Josh
          last edited by

          You are indeed a hero member added the mine type and worked straight away  :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.