On a machine with a hundred images, docker image ls is a long scroll. The reference filter takes a name pattern and keeps only matching images.
docker image ls --filter 'reference=nginx'
docker image ls --filter 'reference=*:latest'
docker image ls --filter 'reference=ghcr.io/*/*'
The first shows every tag of nginx, the second everything tagged latest, the third every image from the GitHub registry. Add -q and you get IDs to feed into other commands, for example to remove all old builds of one project:
docker image rm $(docker image ls -q --filter 'reference=example/app:pr-*')
Run it without the rm part first and look at the list.
The pattern is matched like a file path, and that trips people up: * does not cross a slash. So *:latest matches wordpress:latest but skips ghcr.io/owner/app:latest, which needs */*/*:latest. Quote the pattern, or your shell may expand the stars into file names first. I find the before= and since= filters useful too, which take an image name and list images created before or after it.
Further reading: docker image ls: filtering