On iPhone/iPad, where are the screenshots of terminated apps stored? Are the screenshots of apps in the app switcher stored in RAM, or are they instead stored in flash, and streamed directly to the GPU via some kind of DMA (direct memory access) connection?

RAM is precious, and after a few days I end up with a lot of apps in my app switcher. Are all those snapshots constantly using up RAM?
They survive a restart so they canonically exist in storage.

Of course, everything you see on screen has to be in RAM, too; so the answer is both.