I got the issue "LinkThumbnailer::HTTPError (Net::ReadTimeout with #<TCPSocket:(closed)>)" while I fetch image or video from link.
Here my code
require 'link_thumbnailer'
object = LinkThumbnailer.generate(link)
image = object.images.try(:first).try(:src).to_s if object.images.present?
I got the issue "LinkThumbnailer::HTTPError (Net::ReadTimeout with #<TCPSocket:(closed)>)" while I fetch image or video from link. Here my code require 'link_thumbnailer' object = LinkThumbnailer.generate(link) image = object.images.try(:first).try(:src).to_s if object.images.present?