各种网络神器
手机赚钱

WordPress博客新浪微博图片失效解决方法

【点击赚钱】闪电鸡推出新的模式一天躺赚144块

 最佳答案:

最近很多站长反馈说客上的图片引用了新浪微相册,最近两天突然发现文章中的图片无法显示。浏览器右键“查看图片”显示:

  1. 403 Forbidden
  2. You don‘t have permission to access the URL on this server.
  3. Powered by Tengine

而复制图片链接,直接在浏览器中打开,又可以看到图片,这是这个什么防护机制呢?估计应该是开启了所谓的防盗链功能,而且这个情况只有电信和移动网络是这样,联通貌似正常。这样的话,除了将图片变成本地化,或将图片转移第三方存储空间之外还有什么办法呢?下面提供一种临时的解决方案,具体做法就是在当前主题头部模板 header.php 文件的最后一个<meta> 标签下面添加以下代码:

  1. <meta name=“referrer” content=“no-referrer”>

成功添加这个标签后,博客上所引用的新浪相册图片就可以正常显示了。(你的第三方流量统计会失效

不过貌似并不是所有浏览器都支持这个标签,比如 IE,不过也多亏微软自己都把 IE 抛弃了,国内那些所谓双核浏览器,在极速或者高速模式下也正常显示。至于这个“nofollow、noopener 和 noreferrer 标签的区别?”标签的作用是什么,大概意思就是说“所有请求不发送 referrer”,具体就是不能流量统计失效,更具体的介绍请自行百度学习。有emlog博客的朋友可以参考( emlog博客新浪微博图片失效解决方法 )

还有一种方法是,跟换图片地址的前缀,经过测试发现ww1.sinaimg.com/,ww2.sinaimg.com/,ws1.sinaimg.com/,ws2.sinaimg.com/,wx2.sinaimg.com/,wx1.sinaimg.com/这些前缀的都已经失效。
经测试:tva1.sinaimg.cn/,tva2.sinaimg.cn/这些前缀是新出来的,没有失效。
大家可以去我的新浪图床上传测试:tu.fulioh.com

微博图床,已经用了这么长时间了,应该是不会就这么玩完了。

英文:

Best answer:

Recently, many webmasters have reported that the pictures on the guest page have cited Sina micro albums. In the past two days, they suddenly found that the pictures in the article could not be displayed. The browser right clicks “View Image” to display:

403 Forbidden
You don’t have permission to access the URL on this server.
Powered by Tengine
Copy the image link, open it directly in the browser, and you can see the picture. What is the protection mechanism? It is estimated that the so-called anti-theft chain function should be turned on, and this situation is only the case for telecommunications and mobile networks, and Unicom seems to be normal. In this case, is there any way to turn the image into localization or transfer the image to a third-party storage space? The following provides a temporary solution by adding the following code below the last <meta> tag in the current theme header template header.php file:

<meta name=”referrer” content=”no-referrer”>
After successfully adding this tag, the Sina album image referenced on the blog can be displayed normally. (Your third-party traffic statistics will be invalid)

However, it seems that not all browsers support this tag, such as IE, but thanks to Microsoft itself, IE has been abandoned. The so-called dual-core browsers in China are also displayed in extreme speed or high-speed mode. As for the difference between the “nofollow, noopener and noreferrer tags?” What is the role of the tag, probably means “all requests do not send referrer”, specifically the traffic statistics can not be invalidated, more specific introduction please Baidu learning. Friends with emlog blog can refer to (emlog blog Sina Weibo image failure solution)

Another way is to change the prefix of the image address, after testing found ww1.sinaimg.com/, ww2.sinaimg.com/, ws1.sinaimg.com/, ws2.sinaimg.com/, wx2.sinaimg.com/ , wx1.sinaimg.com/ These prefixes have expired.
Tested: tva1.sinaimg.cn/, tva2.sinaimg.cn/ These prefixes are new and have no invalidation.
Everyone can go to my Sina map upload test: tu.fulioh.com

The microblogging bed has been used for such a long time, and it should not be finished.

赞(0)
未经允许不得转载:920神器网 » WordPress博客新浪微博图片失效解决方法

评论 抢沙发

评论前必须登录!

立即登录   注册