Skip to content

feat: add support for hosted PNG social icons to improve compatibility with Outlook#81

Merged
orkhanahmadov merged 1 commit into
mainfrom
use-png-for-social-icons
May 13, 2026
Merged

feat: add support for hosted PNG social icons to improve compatibility with Outlook#81
orkhanahmadov merged 1 commit into
mainfrom
use-png-for-social-icons

Conversation

@orkhanahmadov
Copy link
Copy Markdown
Member

@orkhanahmadov orkhanahmadov commented May 13, 2026

In this PR:

  • Social icons now render as <img src=".../{style}/{platform}.png"> instead of inline SVG data URIs. Outlook desktop (Word engine) doesn't support SVG and rejects base64 in <img src> — emails were broken there.
  • New RenderOptions.socialIconsBaseUrl (defaults to version-pinned unpkg URL of this package). 80 PNGs (16 platforms × 5 styles, 192×192) ship with the npm tarball; rasterized at build via @resvg/resvg-js with renderAsync parallelism (~7s for all 80, assets gitignored).
  • Replace overflowing 5-option Style segmented control with a native dropdown in the social block sidebar.
  • Removes deprecated exports: SOCIAL_ICONS, generateSocialIconDataUri. Adds DEFAULT_SOCIAL_ICONS_BASE_URL.
  • Editor canvas keeps its existing SVG preview — only the MJML output switched to PNG.
  • Docs updated (EN + DE).

Related to #80.

@orkhanahmadov orkhanahmadov self-assigned this May 13, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying templatical-playground with  Cloudflare Pages  Cloudflare Pages

Latest commit: b7ebacd
Status: ✅  Deploy successful!
Preview URL: https://3c98cb11.templatical-playground.pages.dev
Branch Preview URL: https://use-png-for-social-icons.templatical-playground.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying templatical-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: b7ebacd
Status: ✅  Deploy successful!
Preview URL: https://090dfb1a.templatical-docs.pages.dev
Branch Preview URL: https://use-png-for-social-icons.templatical-docs.pages.dev

View logs

@orkhanahmadov orkhanahmadov merged commit 254a204 into main May 13, 2026
14 checks passed
@orkhanahmadov orkhanahmadov deleted the use-png-for-social-icons branch May 13, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant