locked
Image not displaying when deployed to Azure web site, works fine local RRS feed

  • Question

  • User-2145974911 posted

    I deployed my website to http://ffinfo.azurewebsites.net/ to test it out and the log is not showing up on the deployed site. If I do a control+F5 in Visual Studio 2012 the logo will show up just fine (it should be appearing in the top left cornor). I have verfied the the logo was uploaded by going to http://ffinfo.azurewebsites.net/images/logo.png If I look at the source of the deployed site from I.E. I see the img tag

     

    <img id="imgBanner" src="/Images/logo.png" alt="Final Fantasy Info.com Logo" style="height:127px;width:400px;" />

    Why is it that only this one image is not showing up and only when deployed to Azure?

    Wednesday, January 16, 2013 9:49 PM

Answers

  • User-2145974911 posted

    It turns out the .min version of my CSS file had

    img
    {
     display: none;
    }

    which was causing it not to display this image.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 17, 2013 9:53 AM

All replies

  • User1119594843 posted

    Hi,

    if you use server image tag,

     <asp:Image ID="Image1" ImageUrl="~/images/logo.png" runat="server" />

    if you use html image tag

     <img id="imgLogo" src='<%=ResolveUrl("~/images/logo.png") %>' alt="logo"  />

    Thursday, January 17, 2013 5:08 AM
  • User-2145974911 posted

    I have another image that works just fine using the <asp:image> tag it is just this one image that is not working. I have also tryed with the tildy and it does not display

     

    Doing some testing just now I can take the code for the image that works and past it on the line right about the broken logo code and that image will not work either. If I change the line of code for the working image so it points to the logo it works fine.

    Thursday, January 17, 2013 7:02 AM
  • User-2145974911 posted

    It turns out the .min version of my CSS file had

    img
    {
     display: none;
    }

    which was causing it not to display this image.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 17, 2013 9:53 AM