Anti-leech protection for WeChat images and anti-leech protection for WeChat Images

Source: Internet
Author: User

Anti-leech protection for images
ImageAnti-DDoSLeeching(This image is from the public platform and cannot be consumed without permission) (no source is found. If any infringement occurs, please inform us in time. Thank you)

 

Because the image referenced in the  label <? Php $ img = "http://mmbiz.qpic.cn/mmbiz/sources/0";?>  "/> :! [Input image description] (https://static.oschina.net/uploads/img/201603/17171821_24sw.png "weixin") This is because now also began to prevent external links, after a day of search efforts found the following method can be solved, the use of js solution. Solution: ''' <script type = "text/javascript"> function showImg (url) {var frameid = 'frameimg '+ Math. random (); console. debug (frameid); console. debug (url); window. img = '?
 
 
1234567891011 <imgsrc="http://mmbiz.qpic.cn/mmbiz/CoJreiaicGKekEsuheJJ7Xh53AFe1BJKibyaQzsFiaxfHHdYibsHzfnicbcsj6yBmtYoJXxia9tFufsPxyn48UxiaccaAA/640? wx_fmt=jpeg&amp;wxfrom=5&amp;wx_lazy=1data-s="300,640" data-ratio="0.6672661870503597" data-w="" data-type="jpeg" width="auto" data-src="" style="box- sizing: border-box !important; word-wrap: break-word !important; width: auto !important; visibility: visible !important;"  /></p><p style="max-width: 100%;  min-height: 1em; white-space: pre-wrap; color: rgb(62, 62, 62); rgb(255, 255, 255); box-sizing: border-box !important; word-wrap: break- word !important;">


There is also a data-src to remove the value.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.