How to Optimize Images for SEO Automatically

December 11, 2020


How to Optimize Images for SEO Automatically - This is done so that the images on your blog page are indexed automatically by search engines like Google You not bothered by adding manual (add a description to <img alt="description of the image" height="125" scr="/image.png" width="125" /> when posting a image).


This method can be said to be troublesome. With this automatic method, each image has the same description as the image title. Therefore, You must give the appropriate name for every image that will be posted.


Why do you have to Optimize Images for SEO Automatically?

Because the image on the blog page is one of the media that can be used for traffic on search engines because some internet users really like to search or just browse to see-view image.


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

Search for code </body> on the blog template You, then copy and paste the code below right above 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 a code SEO friendly.


May be useful.


Source : Share with your friends & your family

Palki 2 Premium - Responsive Blogger Template Free Download
Simplify 2 Premium Responsive Blogger Template Free Download

Palki 2 - Responsive Blogger Template - Palki 2 is responsive and SEO Optimized free blogging template. We always focus on Search Engine Optimization. That's why, SEO friendly template developing is one of our biggest challenge. Mobile friendly Blogger template is also important is better SEO Result. So, use a high performed mobile friendly blogger template on your blog. Palki 2 is also a mobile friendly template. Try this out now.

The following features of the Palki 2 Premium Template.

Premium Features Availability
Remove Footer Credits True
No Encrypted Scripts True
For Unlimited Domains True
Template Updates True




Author MS Design BD
Template Name Palki 2
Created 20 March 2016
Platform Blogger
File Type zip
Type Premium

Artikel Terkait

Previous
Next Post »