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

    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 44 posts 202 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 179 posts 540 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.

Please Sign in or register to post replies

Write your reply to:

Draft