So, I was going to do a whole planned thing about Spinosaurus, but then I had to do school and I forgot about it... Then I thought about this idea which some may not agree with, but I still think it's an interesting and semi-plausible idea. Again, don't take my word for it, this is just an idea.
Archosaur Ectothermy
So, we all assume that dinosaurs were not ectothermic, which I agree with. After all archosaurs are ancestrally endothermic. Maybe some species were mesothermic, but I like to think they may have been fully endothermic, but probably not to the point that mammals or modern birds are. However, despite being ancestrally endothermic, not all archosaurs are such. Modern crocodilians are secondarily ectothermic, as well as proterosuchids (yes, not strictly archosaurs but they still have a place in this equation), and phytosaurs (also not archosaurs, but still...). This comes from a paper published this year about archosaur endothermy.
So, why would an animal evolve ectothermy if it was endothermic to begin with? You might think endothermy brings advantages, and it does; for instance, you don't have to bask in the sun to warm up, that's a huge advantage. However, there are a number of disadvantages; being endothermic, you burn more calories just maintaining your body temperature, and thus you need to eat a lot more food each day, and spend more time eating and hunting. This 2016 study I mentioned above gave reasons why such changes would've been made: environmental pressures. If you are ectothermic, you spend less calories trying to maintain your body temperature, thus you can go weeks or even months without food. This is especially advantageous if you are an aquatic predator in seasonally dry areas; you can just literally sit and wait for prey to come back without starving.
Ectothermic Dinosaurs?
Was Spinosaurus just basking all the time? Well, either way it was resting most of its life anyways. Picture by Robin Liesens
A friend of mine mentioned that apparently the known subadult remains of Spinosaurus are even older than the oldest adult Tyrannosaurus, Sue (who is 29 years old). However, I found zero references to anything about this in the literature, so that might not be worthy of anything. Still, the 2014 Nizar Ibrahim and Paul Sereno paper described the subadult Spinosaurus remains as belonging to an individual 15-19 years of age, and about 56-60% fully grown. Adult Tyrannosaurus slowed their growth at about 18 years of age, same age they reach osteological maturity. So, maybe Spinosaurus did grow like Tyrannosaurus, but let's just say it didn't (this is where you should like, stop reading if you want factual information).
Another thing to note, spinosaurus in general are found in seasonally arid areas; Santana Formation of Brazil was mostly arid and experienced droughts (Irritator); the Kem Kem Formation of Morocco experienced severe droughts as well (Spinosaurus); and so did the Wessex Formation of England (Baryonyx). Being ectothermic would be very helpful in those environments, especially during dry seasons, when their usual food, fish, would've been in short supply.
So, because other archosaurs evolved ectothermy, the possible slower growth rate in Spinosaurus, and the fact that spinosaurs lived in seasonally arid areas, does this mean spinosaurs were ectothermic? I would say it is certainly a possibility, but not conclusively proven yet. There are some problems, like that baryonychine hanging out in the Eumeralla Formation of Australia, which was in the Antarctic Circle at the time. Maybe it was more endothermic than other spinosaurs? I don't know.
I think this is something to be further explored in paleoart circles and in television depictions of these animals. That, and their webbed feet. I would like to see that. If true, this also goes to show just how crocodile like these animals were. Practically freaking giant, bipedal crocodiles.