Fix bug to have replacement image mici current images size, along with
js code clean