We always keep trying to improve our blog's SEO to be a part of ever improving SEO race. A better SEO let us compete with our competitors and rank better than others in search engines. It becomes very difficult task when it comes to optimizing blog images for SEO. Blogger by default provides adding Alt and Title tags to images manually for better SEO but it really became a headache to add these tags manually to each and every image. So today I am introducing a great script which automatically adds Alt and Title tags to all your blog images in one go. You just need to rename your blog image before uploading as this script fetches the name of images and add it as Alt and Title tags. So let's start adding this great script to your blogger blog.
How this script works? :
This script simply takes the image name and use it as the title and alt tag for that particular image.
So to use this script carefully, you have to name your post images correctly. An example of an image with alt and title tag is below:
How to Add Script to Add Alt and Title Tags Automatically:
You just need to follow below-given simple steps to successfully add this great script. So let's start:
- Go to Your Blogger Dashboard.
- Open the Theme Tab and Click Edit HTML.
- Edit your template.
- Search the </body> tag in your template editor. ( Use Ctrl+F for quick find)
- Then paste the below code before the </body> tag.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'/> <script type='text/javascript'> <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> - Now save it.
You'are done! You have successfully added the script which enhances your blog's SEO and surely increase organic visits too. Now check your blog images by pointing mouse cursor to them.
If you have an e-commerce driven blog or website powered by wordpress and if you need advanced SEO services for an e-commerce site you might have to consult a professional SEO agency.
If you have an e-commerce driven blog or website powered by wordpress and if you need advanced SEO services for an e-commerce site you might have to consult a professional SEO agency.
- Also Check : All in One SEO Pack for Blogger (Blogspot)
If you have any query or suggestion, you can drop a comment below.
8 comments:
https://information2505.blogspot.com/ kindly check my seo mistake on my sites and tell me plzzzz
@Muhammad Nadeem
You're doing a great SEO work :) Keep going Buddy!
One small advice: Minimize the popup ads shown on your blog. Sometimes it becomes irritating to the reader and hence the reader leaves the blog.
Stay in touch with BBeginner to get latest SEO updates :)
when i try to paste this code, on my html showing a warning notification. what i do ?
Is it possible to replace alt text with post title instead of file name ?
No longer works, have you updated this code?
Pls check my site for seo advice www.ebunzy.com
Impressive!!! Really i m searching that's like info. Thanks for shared it
PAYROLL SOFTWARE
Thanks for the information. factoHR is an excellent and fast enterprise platform to provides many features like Payroll Software, HRMS, Leave Management System, Attendance Management System Software, Payroll Process, PMS and many more for all business at Affordable Price. Also their support team is very helpful and helped us streamline the entire Payroll and HR Processes.
We love comments! We appreciate your queries but to protect from being spammed, all comments will be moderated by our human moderators. Read our full comment policy here.
Let's enjoy a happy and meaningful conversation ahead!