Minify email code
Use theminify option to trim down the HTML size of your production emails.
Minified email code weighs less in KB, resulting in faster sendouts, faster opens, and bandwidth savings on limited mobile data plans. Every little bit helps.
Additionally, it reduces the risk of Gmail clipping.
Usage
config.js
Customization
You may configure the underlyinghtml-crush library:
config.js
Options
These are the options that can be passed insideminify:
lineLengthLimit
Maximum line length. Works only when
removeLineBreaks is true.removeIndentations
By default, code indentation is removed.
removeLineBreaks
Should line breaks be removed? Maizzle defaults this option to
true.removeHTMLComments
When set to a number, these are the available options:
0- don’t remove any HTML comments1- remove all comments except Outlook conditional comments2- remove all comments, including Outlook conditional comments
removeCSSComments
CSS comments are removed by default, both in
<style> tags and in style="" attributes.breakToTheLeftOf
When any of given strings are encountered and
removeLineBreaks is true, current line will be terminated.false or null or an empty array to disable.
mindTheInlineTags
Some inline tags can accidentally introduce extra text. The minifier will take extra precaution when minifying around these tags.
false, null, or an empty array [] to disable.
API
app.js