Use the Thunderbolt 3 (USB-C) port on your iMac (Retina 5K, 27-inch, 2017) to connect to a mini Displayport external display. Here I am using iiyama 4K Ultra HD (ProLite B2888UHSU) as an external display.
Connects to an external display with Mini Displayport
First, use BENFEI’s connector to convert USB-C to Mini Displayport. Plug it into the USB-C port on the back of your iMac.