It depends on whether the two hosts are running on the same server and IP address (using virtual hosts) or not.
The easy way is to be able to host example.com
and s.example.com
on two distinct IP addresses (perhaps the same machine), in which case you can configure a different certificate for each.
If you're constrained to have a single IP address (and port) for the two names, if you want to use two distinct certificates, you would need to use the Server Name Indication (SNI) extension, which is relatively recent (and might not be supported by all browsers, but it seems to work with recent ones).
If you can't use SNI, you'd need the same certificate to be valid for both example.com
and s.example.com
at the same time, which may be achieved by putting the two DNS entries in the Subject Alternative Name extension, or perhaps by using a wildcard, if the pattern for the two hosts is suitable. These two options are probably more expensive than two distinct certificates, with commercial CAs.
After that, it's a matter of linking to the page content (img...) using https://
links, as @ring0 has already said.