If you want to show filter for the portfolio page, please enable the “Filter” option. Make sure there are sub-categories in the category of the portfolio list. The category structure looks like:
There is no parent category the “Media library” source, please set category for each image:
It will list all categories of level-1 set on images.
You could set category for each image in Media > Library also.