Interesting problem. I have a large number of thumbnails on the same layer. Each thumbnail expands to a larger photo of dogs that need homes.

Once I've set the position of the thumbnails just right - I usually have to adjust the size of my page. (the numbers of the thumbs will change) I adjust the bottom margin upwards by moving the blue dotted line.

When I adjust the size of the page, all the thumbnails end up in a bit of a vertical jumble. - then I have to go back and redo the spacing of the thumbnails once again.

I've tried to 'group' all the thumbnails prior to resizing of the page - but I'm amazed that the thumbnails actually move in the group when I adjust the page. I have not tried to 'lock' the group prior to resizing. I could make an entirely separate layer just for the thumbs I suppose, then lock that entire layer.

I can't quite figure this one out. For a better understanding of the layout here's the page. https://northeastspca.org/dogs.htm