0

When I use file_create_url it return url with http instead of https.

Code Snippet:

$desimg = file_create_url($node->field_image->entity->getFileUri());

Due to which i m getting warning like below

Mixed Content: The page at 'https://www.example.com/' was loaded over HTTPS, but requested an insecure image 'http://www.example.com/sites/default/files/test/test_M_01.jpg'. This content should also be served over HTTPS.

I'm missing something?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.