Earlier i told you best seo tips for images which were all manually to
be followed. However, its not that easy to optimize each and every image
for search engines. So, here is a JavaScript code for your blog which
will add all necessary attributes such as ALT, Title etc to your images
and optimize all your blog images for search engines. This is one of the
easiest way to optimize all images in your blog posts and
implementation process only takes less than a minute. This will not only
optimize new images but will also optimize all images that your blog
have in older posts.
1. Sign in to your blogger account
2. Navigate to Dashboard -> Design -> Edit HTML
3. Search for this code with the help of CTRL + F
Save Template and Enjoy!
1. Sign in to your blogger account
2. Navigate to Dashboard -> Design -> Edit HTML
3. Search for this code with the help of CTRL + F
</body>4. Just Above\Before paste the following Code
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/> <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>
Save Template and Enjoy!
0 comments:
Post a Comment