There's a bit of an "X-Y problem" in the headline question - as far as I know it's a bit of a pain to exclude a certain type of image.
Fortunately, it's very easy to set up a slideshow with only the pictures you want to see, particularly when this is a type of file (for example only .jpg).
Change the display to the "Table" format (assuming it wasn't on that already - Digikam usually defaults to thumbnails). Click at the top of the column to sort by "Type". Click on the first .jpg, then shift-click on the last to block select.
[If you want to get fancy, CTRL-click lets you select and deselect any files you want - this approach also works from the thumbnail display, and could be used after "Select all" to exclude specific files if you really wanted to do it that way.]
At the right of the "Slideshow" tab there should be a drop-down menu. Check this is on "Selection" (and not "All").
Press the "Slideshow" button (or ALT-F9) to run the slideshow of the selected files.