Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#43196 closed defect (bug) (invalid)

wp-admin/upload.php media thumbnails are loaded in http despite all site runs https

Reported by: synthview's profile synthview Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.2
Component: Media Keywords:
Focuses: Cc:


I’m working on a site where wordpress address and site address are the same and starting by https://...
By now,this site is htaccess-password-protected and I’ve noticed media thumbnails don’t appear (but if I click the details, my images appear correctly).
I’ve looked into the generated code and I see img thumbnails are still http:// and not https:// as they should.
Same problem in grid as list view.
My thumbnails appear again if I try to connect to my site via http://, so I’m asked again for password and then I’m redirected to https:// (and I have to set password again).

Change History (1)

#1 @joemcgill
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Image URLs are constructed using the value of the siteurl option unless the site is specifically configured to use a different upload path using the upload_url_path option or by setting the WP_CONTENT_URL constant, so this may be a case where the site is configured improperly. Generally speaking, images should be HTTPS if the siteurl is set using HTTPS.

There are legitimate cases where it's not desirable to set the siteurl to HTTPS (e.g., the site sits behind a revers proxy that resolves HTTPS). In those cases, you'll want to make sure to enforce HTTPS image URL paths through a different method.

Note: See TracTickets for help on using tickets.