简体   繁体   English

Favicon 未显示在登台服务器上

[英]Favicon not displaying on staging server

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" /> 

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.您所要做的就是专注于提供正确的路径、rel 和类型。

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.所以我将图像复制到与 index.html 相同的文件夹中,它可以正常工作。

<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您还可以在此处查看更多答案: 使用 React 和 Webpack 添加 Favicon

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM