Code Monkey home page Code Monkey logo

memegen's Introduction

memegen.link

An API to generate meme images based solely on requested URLs.

Unix: Unix Build Status Windows: Windows Build Status
Metrics: Coverage Status Scrutinizer Code Quality
Issues: Stories in Ready

Generating Images

Visit https://memegen.link/api to browse the API and view examples.

The URLs contain all the information necessary to generate the image. For example, https://memegen.link/buzz/memes/memes-everywhere.jpg produces:

Sample Image

But, the site can also produce masked URLs to conceal the joke:

https://memegen.link/_YnV6egltZW1lcy9tZW1lcy1ldmVyeXdoZXJl.jpg

For any image, lose the extension to see a list of all format options:

https://memegen.link/buzz/memes/memes-everywhere

Special Characters

In URLs, spaces can be inserted using dashes or underscores:

  • dash (-) → space ( )
  • underscore (_) → space ( )
  • 2 dashes (--) → dash (-)
  • 2 underscores (__) → underscore (_)

Reserved URL characters can be escaped:

  • tilde + Q (~q) → question mark (?)
  • tilde + P (~p) → percentage (%)
  • tilde + H (~h) → hashtag/pound (#)
  • tilde + S (~s) → slash (/)
  • 2 single qutoes ('') → double quote (")

For example, https://memegen.link/doge/~hspecial-characters~q/underscore__-dash--.jpg produces:

Escaped Characters

Alternate Styles

Some memes come in multiple forms, which can be selected via ?alt=<style>:

Template with Styles

For example: https://memegen.link/sad-biden/sad-joe-biden/doesn't-think-you'll-vote.jpg?alt=scowl

Or, you can use your own image URL as the style. For example, https://memegen.link/custom/my-pretty/background.jpg?alt=http://www.gstatic.com/webp/gallery/1.jpg produces:

Custom Background

Alternate Fonts

Additional fonts are available (see: https://memegen.link/api/fonts) and can be selected via ?font=<name>.

For example, https://memegen.link/joker/pick-a-different-font/people-lose-their-minds.jpg?font=typoline-demo produces:

Custom Font

Custom sizes

Images can be scaled to a specific width via ?width=<int> or a specific height via ?height=<int>. If both parameters are provided (?width=<int>&height=<int>), the image will be padded to the exact dimensions.

For example, https://memegen.link/both/width-or-height/why-not-both~q.jpg?height=350&width=600 produces:

Custom Size

Preview Images

API clients that want to show a preview of an image while the user is still typing should disable caching and analytics via ?preview=true.

Social Media

Add ?share=true to optimize images sizes for sharing on social media.

Adding Templates

To add a new template, please follow the contributor instructions.

Thanks go to danieldiekmeier/memegenerator for the inspiration!

Sample Clients

Type Language Source Link
Slack Python nicolewhite/slack-meme ---
Slack Go CptSpaceToaster/slackbot ---
Slack --- --- http://www.memetizer.com
Hain JavaScript Metrakit/hain-plugin-meme ---
Website Clojure jasich/mighty-fine-memes http://www.mightyfinememes.com

Additional clients can be found by searching for code examples on GitHub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.