Adding 8GB of iMac RAM to a 4GB iMac depends on what specific Apple iMac you are looking at upgrading and even when it is possible, I don’t suggest it as it’s my thought that considering how cheap iMac RAM is these days, you’d be better off doing one of two upgrades:
For iMacs that can only accept 8GB as maximum memory and assuming your iMac ships from the factory with 4GB filling the memory slots (we’re going to assume your iMac only has two memory upgrade slots which was the case with older iMac released prior to summer 2010) you’ll have to replace the 2x2GB memory upgrades with 2x4GB memory modules to hit 8GB
But if you can hit 16GB on your iMac I suggest you maximize the RAM on your newer iMac (summer 2010 and later) with the maximum memory allowed which at time of writing is 16GB of iMac RAM.
Adding 8GB of iMac RAM to 4GB, while in some iMac configurations is possible, doesn’t make a bunch of sense to me when for under $200 you can completely fill your iMac with the most ram it can handle.
For additional savings on your iMac RAM purchase you can even sell back the iMac RAM you had from the factory for even more savings off your $200 Apple iMac RAM upgrade total price.
OWC will buy back your RAM and at the time I write this will pay you $27 for your 4GB of RAM on 2010 and 2011 Apple iMac models, that if you apply to the total cost of your new iMac 16GB upgrade (two 8GB ddr3 memory upgrade kits are required) you could have your new iMac filled with RAM for a touch over $150.00, (plus taxes, and shipping fees)
And speaking of fees for shipping, most online vendors offer free shipping on this much memory for iMacs, not to mention the out of state tax savings you could be eligible for as well in some cases.
So to answer your question: Yes you can add 8GB of iMac RAM but you’re better off either saving more money on RAM and only adding an additional 4GB or go all out and fill your iMac with as much RAM as possible, which is 16GB of iMac RAM
Here’s the current best and lowest RAM prices for iMac to help you decide on what size memory upgrade to get for your iMac