Yes, they were byproducts of capitalism development: England wanted to expand markets and profits. China was a barrier. This caused a war and the devastation of that country. The rebellions were a byproduct.
To be fair, China always had great famines, at least twice each century. This changed only recently, which in fact is a good argument pro-revolution: after one last famine, it never happened again. The same cannot be said for other countries that were colonized or invaded by capitalist powers; and the famine and problems caused by them during XIX century in China were much worst than the famine after the revolution.
You may be confusing the Taiping Rebellion (1850-1864, 20-30M dead) with the Boxer Rebellion (1899, 100,000 dead)?
The Taiping Rebellion was a civil war between the Taiping (ethnic Hakka, Han subgroup) and Qing dynasty (ethnic Manchu). While yes British opium was a destabilizing factor, so was rampant Qing corruption, religious/ethnic zealotry, etc. China had constant wars for millennia, and this war coincided with the invention of modern guns and artillery while still using pre-modern tactics, which (like the American Civil War) made it especially deadly. Its disingenuous to pin an internal and ill-timed conflict on "capitalism".
To be fair, China always had great famines, at least twice each century. This changed only recently, which in fact is a good argument pro-revolution: after one last famine, it never happened again. The same cannot be said for other countries that were colonized or invaded by capitalist powers; and the famine and problems caused by them during XIX century in China were much worst than the famine after the revolution.