Change size of the media:thumbnail on Blogger RSS Feed

老子叫甜甜 提交于 2021-01-29 04:00:35

问题


Is there any way to resize the media:thumbnail URL on the RSS feed(Blogger) At the moment it's at the default size of height 72px and width 72px. I have tried adding this javascript on the Template and didn't manage to get it work- I added it just before </body>

<script type='text/javascript'>

function resizeThumb(e,b){var c=document.getElementById(e),d=c.getElementsByTagName("img");for(var a=0;a<d.length;a++){d[a].src=d[a].src.replace(/\/s72\-c/,"/s"+b+"-c");d[a].width=b;d[a].height=b}}resizeThumb("ID,100 );//]]>

</script>

Thanks.


回答1:


Here's how i did it:

  $img = el.find("thumbnail").attr("url");  //Get thumnail image from rss feed
  $newText = $img.replace(/\/s72\-c/, "");//replace /s72\-c with nothing
  console.log($newText);


来源:https://stackoverflow.com/questions/39090172/change-size-of-the-mediathumbnail-on-blogger-rss-feed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!