Membuat Ukuran Gambar Thumbnail Di Blogspot Lebih Optimal

Punya masalah dengan ukuran gambar thumbnail di blogspot anda? Coba pakai script di bawah ini. Taruh scriptnya sebelum </head> di template blogspot anda. Jangan lupa ganti ukuran gambarnya. Tinggal ganti value di   var dimension = 90; menjadi 120 atau yg lain. Lalu #PopularPosts1 diganti dengan class atau id div element sesuai dengan letak gambar yang ingin anda ganti sizenya.


<script language='javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>//<![CDATA[
/**
this script was written by Confluent Forms LLC http://www.confluentforms.com
for the BlogXpertise website http://www.blogxpertise.com
any updates to this script will be posted to BlogXpertise
please leave this message and give credit where credit is due!
**/
$(document).ready(function() {
// change the dimension variable below to be the pixel size you want
var dimension = 90;
// this identifies the PopularPosts1 div element, finds each image in it, and resizes it
$('#PopularPosts1').find('img').each(function(n, image){
var image = $(image);
image.attr({src : image.attr('src').replace(/s\B\d{2,4}/,'s' + dimension)});
image.attr('width',dimension);
image.attr('height',dimension);
});
});
//]]></script>

 

Scriptnya nyomot dari http://www.blogxpertise.com/2012/03/resize-your-thumbnails-in-bloggers.html

3 thoughts on “Membuat Ukuran Gambar Thumbnail Di Blogspot Lebih Optimal”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.