Most of the above comments seem to address the issue of providing passport information in advance (not unheard of), but not the issue of sending a picture of the main passport page (which I presume is what you meant).
Among my five visits to Spain (most recently 2019), and my many international trips elsewhere, I have on several occasions had to give my passport number when making a hotel reservation on the internet, but I do not recall ever having to send a picture of my main passport page in advance. On those few occasions when I needed to apply for a visa, I did have to send a picture of the passport, and once the passport itself, but in those cases the picture - or the passport -- went to a government agency, not a hotel.