Imageomatic automates mundane and annoying image tasks in Rails, like generating Open Graph images or making SVGs work in dark mode.
Get started in two steps:
- Run
gem install imageomatic
. - Run
imageomatic install
from the root of your Rails app.
When you're ready to deploy to production, signup for an account and we'll automagically take screenshots of your pages or badges that make your great app look even better.
Open Graph images
Imageomatic will take screeshots of the top part of your webpage by default. If you want to get fancier, just add a opengraph
format view to your app and customize. For example, a blog post at `app/views/posts.html.erb` would be generated at app/views/posts.opengraph.erb
.
Responsive darkmode SVG images
There's a lot of weird hacks to get SVGs working in darkmode. Sprints. Inlining. Eugh.
Imageomatic takes your light SVGs and makes them work in darkmode and lightmode with one tag: imageomatic_svg "icons/my-icon.svg"
. That's it! We take care of the rest.