There is tons of complex variations in this area including
Have either MXM-A (smaller) or MXM-B (larger) card slots to accomodate different performance GPUs (higher performance = bigger)
Have either 2 or 3 heat pipe coolers depending on GPU performance and heat output.
Even grinding parts of heatsink for GPU card component clearance.
Goal of this website is to keep it simple and low cost. Low cost = smaller cards which simplifies everything
Fit in either MXM-A or MXM-B card slot
Fit in either 2 or 3 heat pipe coolers
Don't require grinding (Not sure if 100% true to generally the case)
Runs cooler
So smaller cards is universally usable no matter which iMac you have. Only thing smaller cards lose is better performance. However, these metal cards are in newer semiconductor technology with significant benefits.
Here is a pic of smaller (MXM-A) card vs bigger (MXM-B) card. Fairly obvious the heatsink that fits over them would be different size. GPU, VRAM, and Inductors (square gray silver components) produces heat and need to be whisked away by the heat sink
https://forums.macrumors.com/attachments/mxm-a-vs-bweb-jpg.844741/
Heat sinks have different shapes matched to the specific card. Using a different card can have profiles that smash taller components or make contact to electrically conductive points (Heat sink is a conductor) so test fit, look on the edge to make sure everything is okay.
Benefit of small cards is it generally fits with any of these iMac heat sink variations. But test fit to confirm for sure.
Replacement GPU cards all have varying amount of lower height above the board compared to the original . Therefore, the key is to fill this gap with a copper shim. Generally 0.3 0.5 0.8 1.0mm 1.5mm shims are available in 15mm x 15mm squares. Small cards are usually < 125mm^2 and will fit nicely under 15x15mm shim. Have these sizes on hand to adapt the card when installing heat sink is helpful. Can get these from variety of sources from the cheapest longest shipping (Aliexpress/TEMU) to pricier and sooner (Amazon/eBay?)
If rather just buy the correct thickness shim that fit. Probably need to find a subsititute to check clearance per directions below before purchases.
These shims are all pressed cut so have a tiny lip on one side. Can do one of 2 things
Sanded off the lip and smoothed with 1000 grit
Facing the extruded cut edge towards the GPU die as long as its behond outer edge of the die.
Don't want to have these lips create a gap and reduce thermal transfer efficiency. Alternatively, I have been facing the extruded cut edge towards the GPU die as long as its behond outer edge of the die.
Note the required shim size doesn't just depend on GPU card. It depends on the specific heat sink also. So do not just blindly follow any guide.
Easiest way to choose shim sizes if already have different sizes in hand
Look at where the taller components are. Usually inductors (silver rectangles) are the tallest. These also can't touch the heatsink which results in a short
Insert a shim, sandwich the heat sink and GPU card together (can install without paste and the X bracket/screws (not tightend down) if too loose without them) look and inspect all 4 edges and look for air gaps between heat sink and the tallest components. Shine flashlight from backside maybe helpful. I think this usually results in slightly taller shim than necessary but makes no differences.
If able to sandwich together without X bracket/screws, can rock all 4 edges of the card and see if card pivots over the center where GPU die/shim is located to ensure nothing else is taller.
A pair of tall inductors typically in one corner of smaller MXM-A cards usually clears the cutouts in the smaller heat sink.
This install had a simple way to determine ~correct shim size without detail measurements
https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-33494494
If want to do some detail measurements, look at this
https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-32916003
Some people take the extra precaution to put tekton tape to avoid any component contacting against heatsink causing a short. Note this link installed an EG2 VBIOS which caused more difficulty (unrelated to heatsink/shim) if you were to follow along later posts.
https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-33487147
Depending the heat sink and X bracket, the 4 mounting bolts securing the bracket can come really close and maybe even touching the logic board's underside. Review this area carefully
https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-32931003
Installation and thermal paste references below. Note GPU and VRAM/Inductors use different thermal paste. GPU/CPUs can use Arctic MX-5. VRAM/Inductors use non electrically conductive K5 Pro (DO NOT USE CPU/GPU thermal paste on these). Also don't ever use liquid metal for GPUs. Super electrically conductive and have shorted out hardware.
https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-28696585
Some cards have inductors that can touch the heat sink. These need clearance. Taller copper shims are used on GPU to provide additional clearnace.
Here is a video (Ignore all the stuff about pre install OC EFI onto the SSD etc. Unnecessary when using a USB Linux boot stick to flash vBIOS)