I have sent the aia file to @adwapbao in the PM. Also posting the blocks here so that it will help anyone having the same query. (I have marked the changes made in below blocks)
Also,
If i understood this correctly, then I hope the same has been solved with above blocks, as now you can have any number of images and don’t need to specify any specific number