def embeddable?(asset_path, variant)
      font = EMBED_FONTS.include?(asset_path.extname)
      return false unless variant
      return false unless asset_path.to_s.match(EMBEDDABLE) && asset_path.exist?
      return false unless EMBED_EXTS.include?(asset_path.extname)
      return false unless font || encoded_contents(asset_path).length < MAX_IMAGE_SIZE
      return false if font && variant == :mhtml
      return true
    end
def embeddable?(asset_path, variant)
      font = EMBED_FONTS.include?(asset_path.extname)
      return false unless variant
      return false unless asset_path.to_s.match(EMBEDDABLE) && asset_path.exist?
      return false unless EMBED_EXTS.include?(asset_path.extname)
      return false unless font || encoded_contents(asset_path).length < MAX_IMAGE_SIZE
      return false if font && variant == :mhtml
      return true
    end
An asset is valid for embedding if it exists, is less than 32K, and is
 stored somewhere inside of a folder named "embed". IE does not support
 Data-URIs larger than 32K, and you probably shouldn't be embedding assets
 that large in any case. Because we need to check the base64 length here,
 save it so that we don't have to compute it again later.