Conditionally hide items in a repeater

Hello,
I know there a similar posts, but I didn’t find any one with my specific question …
So I have a repeater on my page and I want it to show my projects, beeing both images and videos.
I already managed to hide or show the image/videoplayer in the boxes, depending what it is, but now I would like to have a button, which let the viewer only see my video projects.
Short I want to switch between mix, only images, only videos.
I could only figure out how to hide the specific container boxes, but then the layout of the repeater won’t change. For example if the first to items are images and I want to only show the videos, I can hide the items, but there will be free spaces.
Is there a way to remove the “image project” ones totally from the repeater, so that the rest adjusts the position and later show them again with another button?
I thought maybe with the array of the repeater, but since i’m pretty new to this, I couldn’t do it ;(
Thanks in advance!

Try this →

#repeater1 - repeater
#button1 - button in the repeater.
#image1 - image in the repeater to collapse…

$w (“#repeater1”). onItemReady (( $item , itemData , index ) => {
$item (“#button1”). onClick (( event ) => {
$item (“#image1”). collapse ():
}):
});

https://www.wix.com/corvid/reference/$w/image/collapse

worked perfectly, thanks a much!