Q:

Function to change the image onload

I am wondering how is it possible to look for an specific image on a page and replace it with some other image on page load. 
for example, I have this on my site :
<img src="/content/public/1472.png">

I want to find this image and change it with the below value on page load :
<img src="/content/public/1473.png">

A:

Use attr() or prop() in ready function :
$(function(){
    $('img[src="/content/public/1472.png"]').attr('src', '/content/public/1473.png');
    //$('img[src="/content/public/1472.png"]').prop('src', '/content/public/1473.png');
})

Hope this helps. 

$(function(){
  console.log('Before : '+$("img").attr('src'));

  $('img[src="http://www.drodd.com/images15/1-4.png"]').attr('src', 'http://www.drodd.com/images15/2-4.png');

  console.log('After : '+$("img").attr('src'));
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<img src="http://www.drodd.com/images15/1-4.png">

