Copied to clipboard

Flag this post as spam?

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


  • Katrine Aamand 1 post 71 karma points
    Mar 31, 2020 @ 09:30
    Katrine Aamand
    0

    SVG as a logo file

    Hi,

    I am in the midst of editing a website and want to change the pixelated PNG logo to a SVG-file.

    The image(SVG) shows up in the preview, but not on the actual webpage. (See the attached picture.)

    What am I doing wrong? or how can I fix it?

    enter image description here

  • Lukaz 25 posts 169 karma points
    Apr 10, 2020 @ 06:56
    Lukaz
    0

    Hi @katrine,

    try this:

    -- where logo is your alias

    @{
        string imgLogo = Model.Root().Value<IPublishedContent>("logo")?.Url;
    }
    <img src="@imgLogo" alt="Company logo">
    
  • Damien Holley 126 posts 425 karma points
    Sep 29, 2020 @ 03:57
    Damien Holley
    0

    Addendum to the above answer, use Url(), not Url as the latter has been deprecated.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies