SEO friendly Image for Blogger - SEO Tricks

January 19, 2011 Add Comment

SEO friendly Image for Blogger - SEO Tricks


If you are a blogger and wants to be professional i.e., want to earn money from blogging then you must optimize your blog for search engines i.e., SEO (Search Engine Optimization). The main source of getting traffic / new visitors to your blog is through search engines like Google.com, yahoo, Bing, Ask. But, by default blogger.com/blogspot.com blogs are not optimized for search engines. So, to make your blog SEO friendly you need to manually add alt and title tags for each image you post / upload on your blog. Its a kind of irritating thing to manually add alt and title tags for each image. Anyway blog owners / webmasters can't add alt and title tags for each images they posts. Well, not anymore! Here is a script that'll automatically add the alt and title tag for the images that you post on your blog.


USE OF THIS SCRIPT:
Anyone who searches for images in major search engines like Google.com, yahoo, Bing, Ask will be redirected to your blog if they click on your uploaded image which helps your blog in gaining extra amount of traffic and new blog visitors to your blog. I guess you understood the importance of adding alt and title tags to your blog. Trust me I can assure you after adding this script to your blog it will rank better than before on search engines. Important thing about this script is that, it'll add alt and title tags for all the images however it may be the one you are going to post or the one that already exists in your blog.

HOW IT WORKS? 
The script just uses the name of your image to auto generate the "alt" and "title" tags. In other words, the name of your image stands as the text for your alt and title tag. It picks up the next character after the last instance of "/" from the image URL link as the starting letter to your alt or title tag. The ending character will be recognized using the last instance of "." from your image URL link.


Considering an example, if you upload an image "seo-script.jpg" using post editor or via mail2blogger. You'll find the URL of the image as "http://1.bp.blogspot.com/....../seo-script.jpg". When you publish the article of the uploaded image then go check out the source code of the same (source code of the uploaded image), you'll find the following tags in it - alt="seo-script" and title="seo-script". Hope its cool......! Stop more manual addition of tags! Save your time :) Just selecting a proper name (keyword) for the images and the script will do the rest and next!


Don't forget to keep these two things in your mind before you name/upload an image.
1. Don't use these two "/" and "." characters when you name to upload your blog post images.
2. Use a name that suits and clearly explains the image for better search engine rankings and for better SEO.


STEPS TO INSTALL THE SCRIPT IN BLOGGER:
1. Log In to your Blogger account >> Dashboard >> Click on "Design" Tab >> Next "Edit HTML" and before editing make a backup of your blog template by clicking on the "Download full template" link at the top of the page. Tick Expand Widget Templates box. Once the backup is over, by clicking Ctrl + F search for the below code in your blog HTML code.

</body>

2. Copy and Paste the IMAGE SEO SCRIPT FOR BLOGGER just above the </body> tag line mentioned in step 1.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
//SEO SCRIPT POWERED BY NISARGA - Blogopers.blogspot.com
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$('img').each(function(){
var $img = $(this);
var filename = $img.attr('src')
$img.attr('alt', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));
});
});
//]]>
</script>

<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$('img').each(function(){
var $img = $(this);
var filename = $img.attr('src')
$img.attr('title', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));
});
});
//]]>
</script>