This has been fact checked several times.

The infamous pic is from the Obama era, but it was deceptive because although they were in the "cage" it was a temporary holding area while you were being processed that day. Everyone was kept together as a family if that's how they came into the country.

The Trump administration used the separation tactic as a way to discourage people from crossing the border. It was a "You come here and we'll take your kids away" threat.