It goes down with the instance. In case of posts, there's only a very low resolution cache kept. Images are not federated, just links to them.
Theoretically you could do overly compressed JPEGs in base64 as data: URI or just other tiny images like I've did in this comment for demonstration, but this is stupid.
If something is accessed it should be stored on the home instance it is accessed from. IMO else this whole defederation nakes no sense if someone does selfhost it, notices it's too storage/compute heavy and kills the whole server.