[wp-trac] [WordPress Trac] #63731: wp-emoji-release.min.js Requires URL Update

WordPress Trac noreply at wordpress.org
Mon Jul 21 18:22:56 UTC 2025


#63731: wp-emoji-release.min.js Requires URL Update
--------------------------+------------------------------
 Reporter:  isaumya       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Emoji         |     Version:
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:  ui, javascript
--------------------------+------------------------------

Old description:

> Currently `/wp-includes/js/wp-emoji-release.min.js` loads the emojis
> inside an `img` tag like this: `<img draggable="false" role="img"
> class="emoji" alt="🚀"
> src="https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/1f680.svg">`
>
> But unfortunately, the URL that it is using is no longer valid and 404.
> So, instead of doming
> `cdn.jsdelivr.net/gh/jdecked/twemoji at 16.0.1/assets/<EMOJI>.svg` the path
> needs to be updated to `/assets/svg/<EMOJI>.svg`.
>
> So, for example, here are some emoji URL that `wp-emoji-release.min.js`
> will try to load and all of them are 404:
>
> - https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/1f680.svg
> - https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/2139.svg
>
> But instead, if you try:
>
> - https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f680.svg
> - https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/2139.svg
>
> You will see them working.

New description:

 Currently `/wp-includes/js/wp-emoji-release.min.js` loads the emojis
 inside an `img` tag like this: `<img draggable="false" role="img"
 class="emoji" alt="🚀"
 src="https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/1f680.svg">`

 But unfortunately, the URL that it is using is no longer valid and 404.
 So, instead of doming
 `cdn.jsdelivr.net/gh/jdecked/twemoji at 16.0.1/assets/<EMOJI>.svg` the path
 needs to be updated to `/assets/svg/<EMOJI>.svg`.

 So, for example, here are some emoji URL that `wp-emoji-release.min.js`
 will try to load and all of them are 404:

 - `https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/1f680.svg`
 - `https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/2139.svg`

 But instead, if you try:

 -
 `https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f680.svg`
 - `https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/2139.svg`

 You will see them working.

--

Comment (by sabernhardt):

 I think your site might use the `emoji_svg_url` hook, and that would need
 to include the `svg` directory for the jsDelivr CDN.
 {{{
 add_filter(
         'emoji_svg_url',
         function() {
                 return
 'https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/';
         }
 );
 }}}

 The [https://github.com/WordPress/wordpress-develop/blob/6.8.2/src/wp-
 includes/formatting.php#L5936 default SVG URL] uses `s.w.org`, resulting
 in images like
 `<img draggable="false" role="img" class="emoji" alt="🚀"
 src="https://s.w.org/images/core/emoji/16.0.1/svg/1f680.svg">`

 The [https://github.com/WordPress/wordpress-
 develop/blob/6.8.2/src/js/_enqueues/vendor/twemoji.js#L26-L34 twemoji
 script defaults] refer to PNG assets, which the
 [https://github.com/WordPress/wordpress-
 develop/blob/6.8.2/src/js/_enqueues/wp/emoji.js#L219 settings override]
 for SVG.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63731#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list