CaptureImage Gem Version

It's create the image of given url, uses Phantomjs at backend to create image


Add this line to your application's Gemfile:

gem 'capture_image'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capture_image


Just create the form_tag and pass the url as text_field i.e.

<%=form_tag ( { controller: "home", action: "capture_image" } ) do%>
  <%= text_field_tag "url", nil %>
  <%= submit_tag :create%>

Pass the url to Rack via action to create the image

req =[:url])
req.params[:url] = url

it uses the middleware at backend to capture image so if you want to handle the request according to your functionality then you can edit the middleware.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request