2

I am trying to figure out how to force Cloudinary to use HTTPS in Keystone.

Tried using {{cloudinaryUrl image width=500 height=500 crop=‘fill’ secure=‘true’}} in the actual post.hbs page but no luck.

I've seen mention of this but cannot figure out which file the person is referring to.

cloudinary config

Molomby
  • 5,859
  • 2
  • 34
  • 27
ControlZ
  • 185
  • 2
  • 16

1 Answers1

4

If you are serving your page in http but you want to force cloudinary to https, you can set the option in the keystone.init function : 'cloudinary secure': true,

This option is mapped on cloudinary options described here

keystone.init({
    'name': 'xyz',
    ...
    'cloudinary secure': true,
    ....

Turning on this option changes http to https the protocol when you print an src image like this :

src=post._.image.src({dpr:'auto'}) // pug syntax
rebe100x
  • 1,473
  • 15
  • 18