In a site setting you can set the scheme for the site. i.e. Scheme=https
<site name="website"> <patch:attribute name="scheme" value="https"/> </site>
The item Link Provider obeys the scheme setting from the site config. So if it is set to https, then all links will be https if AlwaysIncludeServerUrl is set to true in the link provider settings.
But the mediaProvider does not do the same. The mediaProvider only sends back the same scheme that was sent on the request. So if I request a page https://mysite, then all images will be https. But if I request the same site in http://mysite, the scheme is ignored. All links will be http.
Any way to make Sitecore obey the scheme on media also?