Yes, follow this guide: Replace Discourse's default SVG icons with custom icons in a theme
Bump, please. I have the same question.
Out of the box, discourse uses the link icon at the bottom of post as a “share” button (it’s more than the link, it offers social media sharing) yet the same icon is used in the editor to edit a link.
These really ought to be different; they are different functions. OR if anyone has a way to override the global change in the post editor, I’d appreciate it.
Recently changed the Like icon from the “heart” to " book-reader".
Had great success changing all of the Like icons, except the one in the notifications, drop-down list

I’ve used the following header, adding all possible options I could think of:
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('d-unliked', 'book-reader');
api.replaceIcon('d-liked', 'book-reader');
api.replaceIcon('heart', 'book-reader');
api.replaceIcon('new read', 'book-reader');
api.replaceIcon('d-icon-heart', 'book-reader');
api.replaceIcon('notification.liked', 'book-reader'); // notifications
api.replaceIcon('notification.liked_2', 'book-reader'); // notifications
api.replaceIcon('notification.liked_many', 'book-reader'); // notifications
</script>
The heart has been replaced everywhere on the platform, except for the notification drop-down list…
Any thoughts?
Try to add also
api.replaceIcon('notification.liked_consolidated', 'book-reader');
Thanks for the response, Daniela!
Added it, but still no change. The heart still shows as the notification icon.
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('d-unliked', 'book-reader');
api.replaceIcon('d-liked', 'book-reader');
api.replaceIcon('heart', 'book-reader');
api.replaceIcon('new read', 'book-reader');
api.replaceIcon('d-icon-heart', 'book-reader');
api.replaceIcon('notification.liked', 'book-reader');
api.replaceIcon('notification.liked_2', 'book-reader');
api.replaceIcon('notification.liked_many', 'book-reader');
api.replaceIcon('notification.liked_consolidated', 'book-reader');
</script>
Other than this instance, the book-reader icon has replaced all heart icons everywhere.
Thought it might be an icon conflict, so I changed from “book-reader” to “pencil”, since I know notifications can use that icon. Didn’t work, still a heart.
Any thoughts?
我尝试将 envelope 图标替换为 inbox 图标,但更改未应用于用户菜单面板内的图标。它们是否需要以特定方式定位?
我的代码片段:
// {theme}/javascripts/discourse/api-initializers/init-theme.gjs
import { apiInitializer } from "discourse/lib/api";
export default apiInitializer((api) => {
api.replaceIcon("envelope", "inbox");
});
您好 @jrgong ![]()
您可以在此处找到包含通知的图标替换项。
将此行添加到您的代码段:
api.replaceIcon("notification.private_message", "inbox");