Was that due to the british empire, or was that broadly happening across the western world during that same time period?
It's instructive to compare the wealthiest nations in Europe, with the largest colonial-era European empires. There is not much overlap.
Wealthiest countries in Europe: Liechtenstein, Luxembourg, Ireland, Switzerland, Iceland, Norway, Denmark, Netherlands, San Marino, Sweden...
https://en.wikipedia.org/wiki/List_of_sovereign_states_in_Eu...
Largest European colonial empires: Britain, Russia, Spain, France, Portugal, Turkey, Italy, Germany, Denmark, Belgium...
https://en.wikipedia.org/wiki/List_of_largest_empires#Empire...
Some historians believe that once you account for the costs of subjugation and development, empire is not usually net profitable for the sovereign. Basically just a gigantic monument to the ruler's ego.
As Carl Sagan put it: Think of the rivers of blood spilled by all those generals and emperors so that in glory and in triumph they could become the momentary masters of a fraction of a dot.
Britain was much richer per capita than every other major European country and almost all smaller ones. Whether that was because of its much bigger industrial sector or its enpire is debatable.