IMGKit icon indicating copy to clipboard operation
IMGKit copied to clipboard

"Timeout" option to IMGKit.new

Open paladini opened this issue 11 years ago • 3 comments

Hi people,

I'm loving using IMGKit, but I'm having some problems with pages that load forever (yes, they don't give me error and they don't give me the page, just load 'forever').

I already try to use Timeout with IMGKit, but this seems to not work. So, I wanna suggest a thing that can save a lot of people: Timeout option to IMGKit.new.

I'm talking about something like: IMGKit.new('http://www.myurl.com', :quality => 80, (...), :timeout => 5)

In this example, if website don't finish loading or website gives you a 404 error in 5 seconds, IMGKit returns "nil" or something like that.

What you think?

paladini avatar Jan 04 '14 23:01 paladini

:+1: For this feature i just encountered this and wondered if there is an update?

davidpatters0n avatar Aug 07 '14 15:08 davidpatters0n

I just encountered this , but #65 can't help me . please give a fully solution to me ,thanks !

goody9807 avatar Jul 01 '16 04:07 goody9807

https://github.com/pdfkit/pdfkit/pull/368

owexroasia avatar Oct 24 '19 17:10 owexroasia