photo editing – How to create an infinte picture-in-picture effect?

I want to take a picture of an empty frame on a wall, then digitally edit that photo into itself infinite times. So the result should be a picture of a frame, which contains the same picture, which again contains the same picture, and so on. Here is a crappy Paint sketch to illustrate what I mean.

enter image description here

I of course could do it manually, but since I want it to look infinite, that would be a lot of work. Maybe there is a better way how I can achieve this effect? Preferably with GIMP since it is my most used editing software, but I’d be willing to use other software as well, if needed.