IMGKit
IMGKit copied to clipboard
"Timeout" option to IMGKit.new
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?
:+1: For this feature i just encountered this and wondered if there is an update?
I just encountered this , but #65 can't help me . please give a fully solution to me ,thanks !
https://github.com/pdfkit/pdfkit/pull/368