I had a problem with Mixed content because a website that I am working on was loaded over HTTPS, but the image's src was on HTTP (This content should also be served over HTTPS).

I changed the absolute path of the images to the relative one. It solved the problem for me. Maybe someone had the same problem, so I am creating this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joco_sp created an issue. See original summary.

joco_sp’s picture

I had this problem on 8.x-1.4

Here is the patch.

Anonymous’s picture

Is the image coming from an image field?

I just tested this on a site I've got running on https, and I didn't run into any mixed content issues, the url to the file was https for me.

Potentially a cache issue, with the page cached on http before being viewed on https?

As much as this is a relatively small change, I'm curious how the url even got to http while on https - maybe there might need to be a core bug somewhere as well?

criscom’s picture

We have the same issue with colorbox 8.x-1.4. Applying the patch didn't resolve the issue for us.
What is interesting is that the colorbox images' path is absolute.

<a class="colorbox js-hide cboxElement" data-colorbox-gallery="gallery-slideshow-38-field_multiple_images-iltp_zAktAU" href="http://www.mysite.com/sites/default/files/styles/open_graph_image/public/images-content/F1000153.JPG?itok=fz8pw8Y4" title="Yuemdemu"></a>

While images from normal image fields have a relative path.

TheNoOne’s picture

rudam’s picture

Same as criscon, the patch does not resolve my issue... images still on HTTP.

criscom’s picture

Which patch did you try, Rudam? Patch in #5 fixed it for us.

Neslee Canil Pinto’s picture

Status: Needs review » Closed (cannot reproduce)