For the first input it works well, but not for the second. Instead of updating the second one it updates the first. How do I separate this two input previews with the same function? Answer Firstly, the IDs should be unieque, so set “load” to “load1” and “load2” for the img …