If you want the same image to be the background image, you must use actions or scripts because data-driven graphics do not work with smart object layers.
What you need is a template with two cloned smart object layers. The requirement is that each photo shares the same dimensions and resolution (PPI). Apply a blur to the bottom image inside the smart object, and for the top smart object, just scale, rotate, and apply a stroke layer effect. Replacing the bottom (or either of the two) smart object layers will automatically update the content of the cloned one. You will create a cloned smart object layer by duplicating it using the Duplicate Layer option or Ctrl + J.
The next step is to automate using an action, you need to record an action to use the Replace Content menu item and to open the Open dialog so you can select a replacement image to replace the existing one in the template. Additionally, you can record a step to save the image. It can be further automated but start with above described.
If you are not familiar with actions, I will tag scripters who may already have a similar script to assist you with your task @c.pfaffenbichler
... View more