Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Return secure HTTPS images, if possible #37

Closed
pdehaan opened this issue Aug 10, 2016 · 1 comment
Closed

Return secure HTTPS images, if possible #37

pdehaan opened this issue Aug 10, 2016 · 1 comment

Comments

@pdehaan
Copy link
Contributor

pdehaan commented Aug 10, 2016

Fun! Turns out that in some cases we may get some Open Graph magic like og:image:secure_url which is an HTTPS URL (see http://ogp.me/#structured). It'd probably be nice to use this image if available instead of the HTTP og:image or og:image:url versions.

og:image:url - Identical to og:image.
og:image:secure_url - An alternate url to use if the webpage requires HTTPS.

— via http://ogp.me/#structured

Or a real-live example at https://www.mysecretwood.com/collections/our-rings?sort_by=best-selling:

<meta property="og:image" content="http://cdn.shopify.com/s/files/1/1197/3550/t/12/assets/logo.png?13093450641738266550">
<meta property="og:image:secure_url" content="https://cdn.shopify.com/s/files/1/1197/3550/t/12/assets/logo.png?13093450641738266550">

It looks like we're currently the same as Embedly proxy behavior, but seems like a simple fix to get more secure HTTPS images [when available].

node index --url "https://www.mysecretwood.com/collections/our-rings?sort_by=best-selling"

https://www.mysecretwood.com/collections/our-rings?sort_by=best-selling:
  images:
    embedly:
      -
        caption: null
        entropy: 1.93638247295
        height:  220
        size:    46404
        url:     http://cdn.shopify.com/s/files/1/1197/3550/t/12/assets/logo.png?13093450641738266550
        width:   303
    fathom:
      -
        entropy: 1
        height:  500
        url:     http://cdn.shopify.com/s/files/1/1197/3550/t/12/assets/logo.png?13093450641738266550
        width:   500
  url:
    embedly: https://www.mysecretwood.com/collections/our-rings
    fathom:  https://www.mysecretwood.com/collections/our-rings?sort_by=best-selling
@pdehaan
Copy link
Contributor Author

pdehaan commented Aug 10, 2016

Closing. Almost certain this belongs over in mozilla/page-metadata-parser#32 instead.

@pdehaan pdehaan closed this as completed Aug 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant