You can get a Tourist Visa while in UK.
A stay of 60 days that can be extended at Immigration in Thailand by 30 days for a fee of 1,900 Baht.
VISA: General Information - สถานเอกอัครราชทูต ณ กรุงลอนดอน (thaiembassy.org)
Or a Visa Exempt Entry when you arrive. 30 days that can be extended at Immigration.