compositing serveral backgroud images (still images)

I have a single scene of a room with characters in dialogue for an animation. I have composited the scene with a background image of the room and it works great allowing me to produce the desired shadows. However, I also have about 13 camera angle changes during the animation. Is there a way to composite the background images into the render by using the timeline markers that switch cameras to also switch the background composite image? That way if I move the marker to another frame number to switch the camera, the correct background image will be composited as well.

Perhaps using the time node in compositing is what you need? You mix both scene and background image with a mix node, and the time node to the Fac of the mix node.
In the time node you define the frame range.
You can do that for all the shots.

I don’t know if you could link somehow the values for the frames of the time node to the markers and the camera, but at least you could do it manually.
Maybe through a script there is an easy way, I don’t know. Because it doesn’t seem something that you can link in other way, like with a driver or a constraint.

A driver would be neat but why not load them as an ‘image sequence’ but keyframe the frame value? then you have control over when the image changes.

Well I just don’t think I can match those with the markers. However, I’m going to look into seeing how much trouble it would be to script it. The issue I see is how to flip them back to an image that has already been used when the cameras switch. Thanks for looking at it. I guess I can always tree them with the mix node one by one and keyframe it.