Como otimizar imagens para SEO automaticamente - Isso é feito para que as imagens em suas páginas de blog sejam indexados automaticamente pelos motores de busca como o google.



Esse é o código de uma imagem colocada em posts manualmente <img alt="description of the image" height="125" scr="/image.png" width="125"/>




Com a forma automática postada abaixo cada imagem tem a mesma descrição da imagem do título.




A imagem na página do blog é um meio que pode ser usado para o tráfego nos motores de busca, porque a maioria dos usuários de internet são muito propensos a procurar ou apenas navegar para ver as imagens. Veja como instalar o código de SEO automatizada na imagem.




1. Faça login em seu blog> Modelo> Editar HTML


2. Em seguida, copie e cole o código abaixo antes de </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>








3. Se estiver tudo no seu devido lugar, clique em Salvar Modelo.