Reputation: 31
I know this post exists but it seems in those 4 years there have been updates to how bloggers thumbnails are generated. I've tried several approaches, but none of them work so if anyone could help me to find a solution for my problem I'd really appreciate it.
I'd like to change the thumbnail size of my blogger posts that RSS feed grabs. Right now it's using the s72-c (72x72) sized version of my blogger posts and I'd like to replace those with the s1600 version.
In theory it should be simple, but I can't get it to work.
I've tried
<script type='text/javascript'>
$img = el.find("thumbnail").attr("url"); //Get thumnail image from rss feed
$newText = $img.replace(/\/s72-c/, /\/s1600/); //replace /s72-c with s1600
console.log($newText);
</script>
and
<script type='text/javascript'>
$(document).ready(function() {$(".post-thumb").attr("src", function(i, src) {return src.replace( "s72-c", "s1600" );});});
</script>
Another workaround could also be to replace the s72-c part in my zapier code, before it's making the notification post on discord, but fixing the issue at it's core would be preferable.
Upvotes: 0
Views: 850
Reputation:
Try this
document.querySelectorAll('img').forEach(function(img) {
img.src = img.src.replace('/s72-c','/s1600');
});
Upvotes: 1