Google Doc with template - Add an undefined number of images

Hello everyone,
Thanks for your time.

My problem is as follow : with a form, a user can insert from one to ten photos.
Then, in the google Docs Template, I put 10 images.
I would like to :

  • replace the images, when a url of a photo exists,
  • keep the image in the template, when the url of the photo doesn’t exist.

To do that, I use the formula : ifempty(imageurl;{{emptystring}}).
In the attached image, I show the formula for the image 4.
emphasized text : I test all the url formula that you can see in the image, it’s working.

The url of image 4 doesn’t exist in my exemple.
In this exemple, Make create a GDoc.
BUT : but some images are replaced and others are not, randomly a priori.
If I put {{emptystring}} in place of the url of image 1, all the images are not replaced.
So, it doesn’t work in a good way.

:fast_forward: Do you know wich formula I have to use ? Or another way to do what I expected ?

Complement :

If I put {{emptystring}} in the first url image. The image 1, 3, 5 and 10 are not remplaced (while they have an url).
It’s allways this bug, even if I put only 9 images in my template, or if I change the url images. So every time the same bug.

If I put {{emptystring}} in the 4th url, none of the images are replaced.

Very strange isn’t it ?