此处广告位出售

WordPress移除srcset

今天在另一个网站发文时,发现后台上传的图片在文章中不显示,检测代码时,发现了图片地址后有一个srcset、如下图:
WordPress移除srcset

那么如何解决呢,一行代码搞定他:

把下面这段代码放到主题目functions.php下即可。

add_filter( ‘max_srcset_image_width’, create_function(”, ‘return 1;’));

这个时候回到网页刷新下看看,是不是图片已经显示出来了,在看代码,后面的srcset已经被我们搞掉了,到这就大功告成了。
WordPress移除srcset


七彩云博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:WordPress移除srcset

您必须 登录 才能发表评论!

(4)个小伙伴在吐槽
  1. Drug Rehabilitation Centers Near Me http://aaa-rehab.com Alcohol Rehab Centers Alcohol Inpatient Treatment Centers Near Me http://sarturia.com/forum/memberlist.php?mode=viewprofile&u=7830
    Drug Rehab For Young Adults2020-03-31 20:34 Windows 10 | Chrome 66.0.3359.181
  2. Gateway Drug Rehab http://aaa-rehab.com Alcohol Rehab Centers Substance Abuse Powerpoint https://www.atlasobscura.com/users/ea8053f6-17f2-4d0c-85b6-cc49029224d0
    Polysubstance Abuse Disorder2020-03-31 03:21 Windows 7 | Chrome 67.0.3396.99
  3. Substance Abuse Treatment Programs http://aaa-rehab.com Drug Rehab Methadone Treatment http://qooh.me/arehab
    Long Term Alcohol Rehab2020-03-30 12:32 Windows 10 | Chrome 67.0.3396.62
  4. Youth Substance Abuse http://aaa-rehab.com Alcohol Rehab Centers http://aaa-rehab.com Methadone Treatment Centers Near Me http://aaa-rehab.com
    Alcohol Inpatient Treatment Centers Near Me2020-03-26 23:40 Windows 7 | Chrome 67.0.3396.87