Gather and archive files

I'm looking for some help on gathering similar named files, containing them in a named folder and then compressed.
So to start I have 4 files.
xxxx.jpg
xxxx_small.jpg
xxxx_medium.jpg
xxxx_large.jpg
oooo.jpg
I would like all of these similar named items "xxxx" to be grouped together in a folder named "xxxx" and archived.
The only difference with the other 3 files is they have a suffix at the end. That's the only thing that distinguishes them from other files. the file "oooo.jpg" would not be included in the folder as the name is different.
Is this possible?
So to start I have 4 files.
xxxx.jpg
xxxx_small.jpg
xxxx_medium.jpg
xxxx_large.jpg
oooo.jpg
I would like all of these similar named items "xxxx" to be grouped together in a folder named "xxxx" and archived.
The only difference with the other 3 files is they have a suffix at the end. That's the only thing that distinguishes them from other files. the file "oooo.jpg" would not be included in the folder as the name is different.
Is this possible?