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.

Jimp.read() can't read an url from a webserver

See original GitHub issue

For example: Jimp.read("http://www.images.com/0.jpg") Output: Error: TypeError [ERR_INVALID_ARG_TYPE]: The "msecs" argument must be of type number. Received type object

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
hipstersmoothiecommented, Aug 3, 2018

the following works for me in all situations

const jimp = require('jimp');

jimp
  .read("https://images.pexels.com/photos/296282/pexels-photo-296282.jpeg?auto=compress&cs=tinysrgb&h=350")
  .then(image => image.getBuffer(jimp.AUTO, (err, res) => console.log(res)));

just tested in all and i got no errors. can you provide the full code?

0reactions
jotalanussecommented, Aug 6, 2018

Problem solved! I was using the Current version of Node (10.8.0) instead of the LTS (8.11.3). Thanks everyone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jimp read, resize and display image from url - Stack Overflow
I can now get some data of picture from url, when I do something like this: Jimp ...
Read more >
Jimp - npm
read method takes the path to a file, URL, dimensions, a Jimp instance or a buffer and returns a Promise: Jimp.read('./path/to/image.jpg') ...
Read more >
Image processing with Node and Jimp - LogRocket Blog
read ​ method accepts an image as an input. The input could be the location of an image file in the file system,...
Read more >
Changelog - Cypress Documentation
This change aligns with how the cy.visit() command generates urls with query ... Cypress now supports project directories mounted on read-only file systems....
Read more >
NodeJS Image Manipulation (Using JIMP) | by Fabio Kounang
console.log('Image manipulation server is listening to port ' + port); ... Read URL image using Jimp.read method; Load the font you want to ......
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