Search code examples
javascriptember.jsemojioneember-emojione

ember-emojione: serving individual PNG images from a custom CDN?


I'm using ember-emojione.

I would like to display emoji as individual PNGs. I want those PNGs served from a custom domain.

How can I configure that?


Solution

  • Here's how you do it:

    1. In your app's ember-cli-build.js, set sprites and asset inclusion to disabled:

      'ember-emojione': {
        spriteSheet:            false,
        shouldIncludePngSprite: false,
      },
      

      Other types of images are not included by default.

    2. In your app's config/environment.js, define the path to PNG emoji on your CDN:

      "ember-emojione": {
        emojione: {
          imageType:    'png',
          imagePathPNG: 'https://my.cdn.com/emojione/png/',
        }
      }