Can Cloudinary's imaged be served via SSL/HTTPS?

Cloudinary supports delivery of all images both through HTTP and HTTPS (SSL). Cloudinary delivers all images and transformed images through a fast CDN (Akamai and Amazon CloudFront). For HTTP delivery http://res.cloudinary.com is used, for HTTPS the base URL is https://res.cloudinary.com.

For example:

HTTP: http://res.cloudinary.com/demo/image/upload/sample.jpg

HTTPS: https://res.cloudinary.com/demo/image/upload/sample.jpg

 

If you have an Advanced Cloudinary account with a dedicated CDN distribution, a different domain name might be used for HTTPS.

If you use one of our client libraries (Ruby, PHP, etc.), the URLs of images are built automatically using the correct domain either by detecting the request's protocol or by specifying :secure => true in calls to methods like cl_image_tag and cloudinary_url.

Have more questions? Submit a request

Comments

  • Avatar
    Apps 20 Year Media

    I have not had success in Rails 4 getting Cloudinary to serve images via https. 

    I have tried secure: true in cloudinary.yml,  image_tag, cl_image_tag and also tried to define an cloudinary.rb initialization without success. 

    I have not had any success in Rails4 either setting secure: true in cloudinary.yml, 

    Here is my yml.. 

    development:

    cloud_name: mycloudname

    api_key: 'key'

    api_secret: secret

    enhance_image_tag: true

    static_image_support: false

    secure: true

    production:

    cloud_name: mycloudname

    api_key: 'key'

    api_secret: secret

    enhance_image_tag: true

    static_image_support: false

    secure: true

    Any ideas would be appreciated.

     

  • Avatar
    Niall Burkley

    Adding 'secure: true' to the cloudinary.yml file worked fine for me. Don't forget to restart your server to pick up the change.

  • Avatar
    Staging User

    Adding 'secure: true' doesn't work for me. Not sure if updating gem will help.

  • Avatar
    haruhiko kobayashi

    I'm using rails4-2.2 and cloudinary-1.2.2.

    To add secure option Into config/initializer/cloudinary.rb instead of cloudinary.yml, it works for me.

    # config/initializer/cloudinary.rb
    Cloudinary.config do |config|
    config.secure = true
    end

    # carrierwave integration code
    Post.find(1).image.url
    "https://res.cloudinary.com/spacemarket/image/upload/vxxxxxxxxxx/image.jpg"

Powered by Zendesk