1

I would like to use scss for imgkit, but imgkit only takes in css. I thought of rendering the scss as a string, but i am not sure how to pass it into imgkit.

kit = IMGKit.new(get_card_html, :quality => 70, :width=> 200, :height=> 324)

// IMGKit normally takes in a file path
kit.stylesheets << Rails.root.join('app', 'assets','stylesheets' ,'cards.css').to_s

// rendered it to string. how do i pass it into imgkit?
Onethingaday::Application.assets.find_asset('cards.css').body
meow
  • 26,636
  • 31
  • 113
  • 173

0 Answers0