问题
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