Export AMP
ExportExport AMP
AMP for Email (AMP4EMAIL) output for interactive messages.
ref.current.editor.exportAmp((data) => data.amp);
// server: renderAmp(design) // from email-craft-sdkWhat changes in the AMP output
exportAmp renders the same design with AMP components. Every image becomes an <amp-img>, and a carousel block becomes a swipeable <amp-carousel> (its script is added only when the design has one). All styles move into one <style amp-custom> with !important removed, and Outlook conditional comments and VML are left out.
AMP needs fixed sizes, so each image sits in a 600 by 400 responsive box. Images with a 3:2 ratio match that box.
Send it next to the HTML
The AMP document is an extra MIME part. Keep sending the HTML export as the fallback. The amp field on the exportHtml result always has enabled: false, so call exportAmp for the AMP markup. On your server, POST /v3/render with "format": "amp" returns the same document and needs no key.
The CSS cleanup only covers a few known rules, so run the output through the AMP validator before you rely on it in production.