Auto Alt Title Tag Generator For Images In this article I am going to introduce a Script called Auto Alt Title Tag Generator For Images. There are few other scripts available on In...
2018-07-31T07:46:25Z

Auto Alt Title Tag Generator For Images

In this article I am going to introduce a Script called Auto Alt Title Tag Generator For Images. There are few other scripts available on Internet but I found most of them are not working after Blogger has upgraded its features.

Auto Alt Title Tag Generator For Images

The script which I am going to share is working perfectly with new and old blogger interface.

Steps To Add Auto Alt Title Tag Generator To Your Blog:

1.Backup your Template First.
2.Copy the below script and place before in your template.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'/>
Don't add this if you are already using any jQuery.js file
<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('.')));

    $img.attr('alt', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));
  });
});
//]]>
</script>

3.Save the template.To check whether the script working or not,just open your blog and hover mouse over the image.It should show you the name of the image.

How this Script works?


  • This script will automatically take the name of the image and adds a Alt and Title Tag for all the images in your blog.
  • This script not only adds Alt and Title tags but also gives a ‘+’ if there is space in the name of uploaded image.
For example if your upload a image with name Alt Title Tag Generator then it will change to Alt+Title+Tag+Generator making it SEO friendly.

How To Use This Script?


The only thing you have to do is to name your images properly before uploading to blogger.If you don’t name images properly then you may not see proper alt title tags for images.

So this was our guide on Auto ‘Alt’ ‘Title’ Tag Generator for Images , I hope the methods given above helped you
Share it:

Blogging

Tutorial

Post A Comment:

0 comments: