url2png-gem icon indicating copy to clipboard operation
url2png-gem copied to clipboard

Any way to set protocol of url2png_image_url ?

Open birchlore opened this issue 9 years ago • 8 comments

I have an https page, I'm trying to set url2png_image_url protocol to https. Is there any option to do this?

Thanks!

birchlore avatar May 07 '15 20:05 birchlore

Have you already tried? The protocol from the requested page should be used. More details can be found in this commit: https://github.com/hoetmaaiers/url2png-gem/commit/260106247056c4cfa251fedbce3fb3e94469656d

hoetmaaiers avatar May 08 '15 09:05 hoetmaaiers

Strange, I'm getting this error:

Mixed Content: The page at 'https://getdev-staging.herokuapp.com/users/31' was loaded over HTTPS, but requested an insecure image 'http://api.url2png.com/v6/P289C47C4185BF3/8d921085e9c7df5ccbbd51447ac99be4/png/?url=http%3A%2F%2Fwww.jjsuspenders.com'. This content should also be served over HTTPS.

Here's my ERB code:

<% url = url2png_image_url project.url %> <%= link_to image_tag(url, class: "img-responsive"), project.url %>

birchlore avatar May 08 '15 19:05 birchlore

Same problem. This gem probably needs a new maintainer. I'm happy to take over fixing if @hoetmaaiers can give me push access or would point the official repo to https://github.com/polleverywhere/url2png-gem.

bradgessler avatar Sep 24 '15 23:09 bradgessler

Hi @bradgessler, I prefer to first review and accept some pull requests. This might convince me to hand over the ownership of the gem to you.

I'll be glad to see the first PR's coming

hoetmaaiers avatar Sep 25 '15 12:09 hoetmaaiers

I ran into this again today, tried to use this gem, forgot I opened this issue, and created url2png-plus. To help folks evaluate which gem to use I compare url2png with url2png-plus at https://github.com/polleverywhere/url2png-plus#why-url2png-plus-and-not-url2png.

I'm still open to maintaining this gem, but only if you're open to replacing this source code with the url2png-plus source code and can get behind its philosophy of API version management.

bradgessler avatar Nov 11 '17 01:11 bradgessler

I see no issue in both gems being available? Replacing this gem with url2png-plus will break existing gems because they expect a different public API. Referring to url2png-plus is a possibility I guess.

hoetmaaiers avatar Nov 11 '17 19:11 hoetmaaiers

I’d agree there’s no issue. It’s more a question of ambiguity, but it’s not that bad.

For the sake of discussion if we went through with this it could be an exercise or keeping the helpers in this gem to minimize breakage, signify breaking API changes with SemVer, and ship.

On Nov 11, 2017, 11:08 -0800, Hoetmaaiers [email protected], wrote:

I see no issue in both gems being available? Replacing this gem with url2png-plus will break existing gems because they expect a different public API. Referring to url2png-plus is a possibility I guess. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

bradgessler avatar Nov 11 '17 19:11 bradgessler

I am not sure what you are suggesting...

hoetmaaiers avatar Nov 12 '17 15:11 hoetmaaiers