Pulsar.
Skip to main content

Politics

View All

Technology

View All

Lifestyle

View All

Business

View All
Link copied to clipboard
Blogger Tips

How To Optimize Blogger Images For SEO Automatically

Friday, May 1, 2020 5 Min Read LISTEN SUMMARY
How To Optimize Blogger Images For SEO Automatically
How to Optimize Images for SEO Automatically

How to Optimize Images for SEO Automatically

Today I Will Show You How to Optimize Images for SEO Automatically

Lets Start 

Here's how to install an automatic SEO code in the image

Step 1. Go To Blogger > Theme > Edit Html

Step 2. Then Copy And Paste The Code Just Above The Code </body>


<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>
<script type='text/javascript'>
//<![CDATA[
var scrollTimer = null;
$(window).scroll(function() {
var viewportHeight = $(this).height(),
scrollbarHeight = viewportHeight / $(document).height() * viewportHeight,
progress = $(this).scrollTop() / ($(document).height() - viewportHeight),
distance = progress * (viewportHeight - scrollbarHeight) + scrollbarHeight / 2 - $('#scroll').height() / 2;
$('#scroll')
.css('top', distance)
.text(' (' + Math.round(progress * 100) + '%)')
.fadeIn(100);
if (scrollTimer !== null) {
clearTimeout(scrollTimer);
}
scrollTimer = setTimeout(function() {
$('#scroll').fadeOut();
}, 1500);
});
//]]>
</script>
Next, save the template.


Every blog image that you install in an article will automatically have an SEO friendly code.
Avatar
Author & Visual Journalist

Professional editor, visual journalist, and technology analyst. Dedicated to publishing in-depth, research-grounded, and high-fidelity updates on global technological, cultural, and digital developments shaping our common future.

Discussion & Comments

2 comments:

Samrath Malviya said...

i dont understand how can this javascript code help for image optimization in bogger images.
please also write some tips for blogger image optimization

Samrath Malviya said...

i think using this code in blogger theme all images that not have alt text automatically get image file name as alt text. this is good but using this we will not get image ranking we use in posts content.

Post a Comment