Note that you still need to follow Apple’s requirements for technical specifics of the RAM. To find out how much RAM your iMac will really support, a site like EveryMac that tracks this data is worth checking out.
The model I most recently upgraded is a 2011 vintage 27-inch iMac and although Apple lists it as supporting a maximum of 16GB of RAM, in fact it will recognize and utilize 32GB.
That could be great news if your iMac is currently equipped with the maximum amount of RAM and you’re hitting a performance ceiling.
Apple publishes guidelines for the maximum amount of RAM each iMac model supports, however the company is known for being conservative and memory upgrade specialists have discovered many iMacs are actually capable of supporting twice the amount of RAM Apple suggests.