How To Dynamically Remove Scroll Rect Content

I have a Scroll Rect with a movement type of Clamped that has a bunch of images as content. I have seen forums explaining how to dynamically add content, but how do you dynamically remove content and have the content clamp to the correct position?

For example, here is my Scroll Rect and image filled content:
136135-help1.png

I can easily write code to destroy the game object of the first image, but it leaves it like this:
136136-help2.png

Is there any way to remove that first object and have the rest of the objects clamp to the left side? I tried writing code to do it, but was struggling, so I would appreciate any help!

@shmoji Try attach a component to your content object (Or the object that is containing your images) called ‘Horizontal Layout Group’. This will automatically lay out your objects depending on how you set up the component. Seeing as it’s in a scroll rect - I would also advise to use this in conjunction with the ‘Content Size Fitter’ component. Which will resize the scroll view content object based on the size of it’s children; this will resize it to bet fit your children rather than having an empty scrolling gap and the end when they reposition after one gets removed.

https://docs.unity3d.com/Manual/script-HorizontalLayoutGroup.html
https://docs.unity3d.com/Manual/script-ContentSizeFitter.html