Updated EmbedPhotoAction to add transaction management