Giter Site home page Giter Site logo

emojicdn's Introduction

emojicdn

Basic usage

Append any emoji to the end of emojicdn.elk.sh to get a PNG image:

<img src="https://emojicdn.elk.sh/🥳" />

Emoji style

For more control, add the style query parameter to specify an emoji platform:

<img src="https://emojicdn.elk.sh/🥳?style=google" />

If no style is provided, the API defaults to apple.

Supported styles:

  • apple
  • google
  • facebook
  • twitter

Implementation

Hosting

emojicdn is hosted on Hetzner with Kamal. To deploy a new version, run kamal deploy.

emojicdn's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

emojicdn's Issues

spritesheets

I'm updating the notion-enhancer at the moment and trying to reduce lag as much as I can, and the emoji-sets extension that depends on this is... not fast.

It works by replacing emojis one-by-one with the emoji from emojicdn in the chosen style - which is fine if it's just doing a few at a time, but isn't great when you open the emoji picker and it has to load all 3000+ emojis. It's not a massive download size, but it takes a long time when every request is done individually.

image

If at all possible I'd like to stick with emojicdn because it has wide support and is fairly reliable/easy to use. The only thing I can think of to speed this up would be to provide a full emoji set as a spritesheet that could be downloaded in one request or packaged with the enhancer... could emojicdn provide these? Or do you have any other ideas?

Edit: I've attempted doing all the many requests asynchronously, but then the whole page freezes up for a couple of minutes until it's done.

Missing Microsoft Emoji

Hello, I use emojicdn to embed emoji into google sheets since they are not supported when exporting to PDF. I typically use the microsoft style for emojis and recently all of the emojis in my workbook disappeared because it appears that the microsoft style is no longer available.

Emoji CDN stopped working

Hi Ben! Thanks for your cool CDN. I used it to build a website called https://whatsmuse.com
It was working but it looks like after a recent update it stopped working. You can see errors in the web console.
Just thought I'd let you know.

Also, I have a friend at Tufts who knows of you!

Content type header not set

The API does not bother to set the content-type on responses which causes issues for anything that checks those to see if the URL points to an image.

jsDelivr was banned in China, can we maybe just return the image instead of `redirect`?

hey ben,

i've noticed like 2 months ago, you changed the tech stack in this repo from php to cloudflare workers, also added redirect for emojis to further increase the cost-effectiveness(i think). but there is a problem now: the domain cdn.jsdelivr.com got banned in China like 2 years ago. as a result, this CDN won't be working in raw Chinese network environments.

i forked your repo and made my own deployment (emoji.jw1.dev), changing redirect() to fetch() seems to be working. so i'd like to propose you make the same change for better versatility, the only problem now is, what kinda impact will it have on the workers' performance and cost?

changes i made:
https://github.com/jw-12138/emojicdn/blob/main/index.js#L33C1-L40C3

btw awesome project!

CORS header

Hi there! The CDN is awesome, congrats! 🥳

I have this particular use case where I'm trying to retrieve the color palette from the emojis (any image actually but I just happen to be using your CDN) and to do that I have to add it to an HTML canvas element.
Since the image comes from a different origin than the website and no CORS header is preset the canvas gets tainted and refuses to use methods like getImageData(). The problem in detail

I'm no PHP expert (I don't know anything about PHP actually) but I think that adding the CORS definition should do the trick.

app/Http/Controllers/EmojiController.php line 95

return response($emojiImage)
            ->header('content-type', 'image/png');
            // ->header('Access-Control-Allow-Origin', '*'); or something like that

Please let me know if this is feasible and if you're willing to do that.

Have a great week!

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.