0

Please help this here i'm trying to display title with logo on tab But in local it's working fine but staging server not displaying the logo.

<title>Global</title>   

<link type="image/png" href="src/assets/images/logo/bigImage.png" rel="shortcut icon" /> 
Paulie_D
  • 107,962
  • 13
  • 142
  • 161
pramod J B
  • 77
  • 1
  • 6

1 Answers1

0

It's the same as adding any other external script or stylesheet. All you have to do is focus on giving the correct path and rel and type.

Note: When my favicon image was in the assets folder, it was not displaying the favicon. So I copied the image to the same folder as of my index.html and it worked perfectly as it should.

<head>
    <link rel="shortcut icon" type="image/png/ico" href="/favicon.png" />
    <title>SITE NAME</title>
</head>

It worked for me. I hope it works for you too.

You can also check some more answers here: Add Favicon with React and Webpack

Prakhar Mittal
  • 6,315
  • 1
  • 14
  • 31
  • Where is favicon icon is there same location only i added but again not displaying on staging server – pramod J B Feb 21 '20 at 05:15
  • Global added like this still its not working, please help me. – pramod J B Feb 24 '20 at 13:14
  • Your index.html and icon must be in the same folder i.e. public. Then why are you importing again from the public folder by going one up first on the tree. **href="../public/assets/images/TalentPoollogo.png"** It should be **href="./assets/images/TalentPoollogo.png"** – Prakhar Mittal Feb 25 '20 at 05:48
  • this is not working in local and staging both. – pramod J B Feb 25 '20 at 12:45
  • F:\desuvit\projects\workingbranch\TalentPool.WebApp\public\assets\images – pramod J B Feb 26 '20 at 06:37
  • I meant something like this: https://www.c-sharpcorner.com/article/folder-structure-of-react-application/Images/Folder%20Structure%20of%20React.png – Prakhar Mittal Feb 26 '20 at 06:38