Avoid "mixed content" message when loading images

Created on 26 April 2024, 2 months ago

Problem/Motivation

I get the following error:

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure element ''. This request was automatically upgraded to HTTPS, For more information see

Steps to reproduce

Run Drupal behind a reverse proxy on port 80. In my case, this is Traefik, a tool used in production environments.

Proposed resolution

Avoid the protocol in image URLs, for example by using //example.com/image.jpg instead of http://example.com/image.jpg.

Remaining tasks

While the attached patch solves the issue for images without a style, it remains for images loaded via a style.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs review

Version

1.5

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Gogowitsch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024