Skip to main content

flayyer gem



This module is agnostic to any Ruby framework.

1. Install flayyer gem#

Add this line to your application's Gemfile:

gem 'flayyer'

And then execute:
bundle install

Or install it yourself as:
gem install flayyer

2. Generate smart image URLs for your meta-tags#

Find your project-slug in your dashboard. If you don't have a project yet, create one here.

Now you can generate smart image URLs like shown below.

require 'flayyer'
flayyer = Flayyer::FlayyerAI.create do |f|
# Your project slug
f.project = 'your-project-slug'
# The current pathname of your website, try to set it dynamically
f.path = '/path/to/product'
# Use this image URL in your <head/> tags
url = flayyer.href
# >

Take a look into the Ruby on Rails integration guide to see a full example for your specific setup. You're invited to contribute to the Ruby documentation and add your own guide for other technologies.


The meta-tags code needs to be static, processed at build time or server-side rendered for link previews to work.

3. Voilà 🎉#

Now you're able to manage your link previews from your dashboard, create content from templates while preserving your brand style and export it as social media formats.

Go to your dashboard 🚀

Advanced usage#

Signed URLs#

The package flayyer supports HMAC and JWT signatures.

Find your secret key in your dashboard > your project > Advanced settings > Signed URLS, and enable the signing strategy you desire.

from flayyer import FlayyerAI
flayyer = FlayyerAI(
strategy="JWT", # or "HMAC"
# Use this image in your <head/> tags
url = flayyer.href()
# >
Last updated on by Franco Méndez