title: Change the all images webp file extension on Safari browser when my website load
body: <p>Need help I am trying to change the all images webp extension into "png" when my website load on safari browser. </p>
  
  <pre><code>Webp image path
  
  
      &lt;img class="img-fluid" src="image/img-1.webp" alt=""&gt;
      &lt;img class="img-fluid" src="image/img-2.webp" alt=""&gt;
      &lt;img class="img-fluid" src="image/img-3.webp" alt=""&gt;
  </code></pre>
  
  <p>I want to change into png extension</p>
  
  <pre><code>    &lt;img class="img-fluid" src="image/img-1.png" alt=""&gt;
      &lt;img class="img-fluid" src="image/img-2.png" alt=""&gt;
      &lt;img class="img-fluid" src="image/img-3.png" alt=""&gt;
  
  
  
  $(document).ready(function () {
  
     if($.browser.safari){
      $("body").each(function(){
          var imageExtension = $("img").attr('src').split('.').pop();  
          for(var i = 0; i &lt; $("img").length; i++)
      {
          extensionChange = imageExtension.replace(imageExtension,'.png' );
          console.log(extensionChange);
      }
      $("img").attr('src').split('.').pop();
      });
      }
  });
  </code></pre>