question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pass a URL with jimp.read and have option to pass "rejectUnauthorized : false" to the request

See original GitHub issue

Expected Behavior

I would like to pass an option rejectUnauthorized : false to the Jimp.read()` method when I pass a URL to it. I want to read the image even if there is a problem with the certificate. I don’t want to configure the behaviour globally to the server.

Current Behavior

If I have somehow troubles to get the certificate of the URL, I get the following error => Error: unable to verify the first certificate

Failure Information (for bugs)

Error unable to verify the first certificate _tls_wrap.js in TLSSocket.<anonymous> at line 1105:38 events.js in emitNone at line 106:13 events.js in TLSSocket.emit at line 208:7 _tls_wrap.js in TLSSocket._finishInit at line 639:8 _tls_wrap.js in TLSWrap.ssl.onhandshakedone at line 469:38

Steps to Reproduce

Jimp.read(‘https://404store.com/2017/12/08/Random-random-30798866-500-325.jpg’)

Context

  • Jimp Version: 0.4.0
  • Operating System: Unbuntu Server 16.04
  • Node version: v8.11.1

Failure Logs

Error unable to verify the first certificate _tls_wrap.js in TLSSocket.<anonymous> at line 1105:38 events.js in emitNone at line 106:13 events.js in TLSSocket.emit at line 208:7 _tls_wrap.js in TLSSocket._finishInit at line 639:8 _tls_wrap.js in TLSWrap.ssl.onhandshakedone at line 469:38

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
hipstersmoothiecommented, Sep 15, 2018

related to #267

1reaction
turakvladcommented, Sep 29, 2018

@hipstersmoothie, thanks! I am glad to help.

I will make a PR on the weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using rejectUnauthorized with node-fetch in node.js
To get around that it set rejectUnauthorized. My working code with request looks like this: var url = 'someurl'; var options = {...
Read more >
Jimp
The static Jimp.read method takes the path to a file, URL, ... Also, you can pass rejectUnauthorized: false if you don't require an...
Read more >
Image processing with Node and Jimp
Jimp's resize() method alters the height and/or width of an image via a two-pass bilinear algorithm. Syntax: resize( w, h[, ...
Read more >
Getting Started with JIMP image processing
This tutorial will go over the basics of JIMP image processing package ... JIMP uses the two-pass bilinear algorithm to resize the width...
Read more >
Image Processing in NodeJS with Jimp | by Ross Bulat - Medium
Full code example: combining images, watermarking, fonts and text. You are requested by a client to watermark an entire library of images, as ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found