{"id":176,"date":"2026-03-21T22:47:21","date_gmt":"2026-03-21T14:47:21","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/nodes-images\/"},"modified":"2026-03-21T23:08:56","modified_gmt":"2026-03-21T15:08:56","slug":"nodes-images","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/nodes-images\/","title":{"rendered":"\u56fe\u50cf\u548c\u5a92\u4f53\u652f\u6301"},"content":{"rendered":"<h1>\u56fe\u50cf\u548c\u5a92\u4f53\u652f\u6301<\/h1>\n<h1>\u56fe\u50cf\u4e0e\u5a92\u4f53\u652f\u6301 \u2014 2025-12-05<\/h1>\n<p>WhatsApp \u6e20\u9053\u901a\u8fc7 <strong>Baileys Web<\/strong> \u8fd0\u884c\u3002\u672c\u6587\u6863\u8bb0\u5f55\u4e86\u53d1\u9001\u3001Gateway \u7f51\u5173\u548c\u667a\u80fd\u4f53\u56de\u590d\u7684\u5f53\u524d\u5a92\u4f53\u5904\u7406\u89c4\u5219\u3002<\/p>\n<h2>\u76ee\u6807<\/h2>\n<ul>\n<li>\u901a\u8fc7 <code>openclaw message send --media<\/code> \u53d1\u9001\u5e26\u53ef\u9009\u6807\u9898\u7684\u5a92\u4f53\u3002<\/li>\n<li>\u5141\u8bb8\u6765\u81ea\u7f51\u9875\u6536\u4ef6\u7bb1\u7684\u81ea\u52a8\u56de\u590d\u5728\u6587\u672c\u65c1\u8fb9\u5305\u542b\u5a92\u4f53\u3002<\/li>\n<li>\u4fdd\u6301\u6bcf\u79cd\u7c7b\u578b\u7684\u9650\u5236\u5408\u7406\u4e14\u53ef\u9884\u6d4b\u3002<\/li>\n<\/ul>\n<h2>CLI \u63a5\u53e3<\/h2>\n<ul>\n<li><code>openclaw message send --media &lt;path-or-url&gt; [--message &lt;caption&gt;]<\/code><\/li>\n<li><code>--media<\/code> \u53ef\u9009\uff1b\u6807\u9898\u53ef\u4ee5\u4e3a\u7a7a\u4ee5\u8fdb\u884c\u7eaf\u5a92\u4f53\u53d1\u9001\u3002<\/li>\n<li><code>--dry-run<\/code> \u6253\u5370\u89e3\u6790\u540e\u7684\u8d1f\u8f7d\uff1b<code>--json<\/code> \u8f93\u51fa <code>{ channel, to, messageId, mediaUrl, caption }<\/code>\u3002<\/li>\n<\/ul>\n<h2>WhatsApp Web \u6e20\u9053\u884c\u4e3a<\/h2>\n<ul>\n<li>\u8f93\u5165\uff1a\u672c\u5730\u6587\u4ef6\u8def\u5f84<strong>\u6216<\/strong> HTTP(S) URL\u3002<\/li>\n<li>\u6d41\u7a0b\uff1a\u52a0\u8f7d\u5230 Buffer\uff0c\u68c0\u6d4b\u5a92\u4f53\u7c7b\u578b\uff0c\u5e76\u6784\u5efa\u6b63\u786e\u7684\u8d1f\u8f7d\uff1a<\/li>\n<li><strong>\u56fe\u50cf\uff1a<\/strong> \u8c03\u6574\u5927\u5c0f\u5e76\u91cd\u65b0\u538b\u7f29\u4e3a JPEG\uff08\u6700\u5927\u8fb9 2048px\uff09\uff0c\u76ee\u6807\u4e3a <code>agents.defaults.mediaMaxMb<\/code>\uff08\u9ed8\u8ba4 5 MB\uff09\uff0c\u4e0a\u9650 6 MB\u3002<\/li>\n<li><strong>\u97f3\u9891\/\u8bed\u97f3\/\u89c6\u9891\uff1a<\/strong> \u76f4\u901a\u6700\u5927 16 MB\uff1b\u97f3\u9891\u4f5c\u4e3a\u8bed\u97f3\u6d88\u606f\u53d1\u9001\uff08<code>ptt: true<\/code>\uff09\u3002<\/li>\n<li><strong>\u6587\u6863\uff1a<\/strong> \u5176\u4ed6\u4efb\u4f55\u5185\u5bb9\uff0c\u6700\u5927 100 MB\uff0c\u53ef\u7528\u65f6\u4fdd\u7559\u6587\u4ef6\u540d\u3002<\/li>\n<li>WhatsApp GIF \u98ce\u683c\u64ad\u653e\uff1a\u53d1\u9001\u5e26 <code>gifPlayback: true<\/code> \u7684 MP4\uff08CLI\uff1a<code>--gif-playback<\/code>\uff09\uff0c\u4f7f\u79fb\u52a8\u5ba2\u6237\u7aef\u5185\u8054\u5faa\u73af\u64ad\u653e\u3002<\/li>\n<li>MIME \u68c0\u6d4b\u4f18\u5148\u4f7f\u7528\u9b54\u6570\u5b57\u8282\uff0c\u7136\u540e\u662f\u5934\u4fe1\u606f\uff0c\u6700\u540e\u662f\u6587\u4ef6\u6269\u5c55\u540d\u3002<\/li>\n<li>\u6807\u9898\u6765\u81ea <code>--message<\/code> \u6216 <code>reply.text<\/code>\uff1b\u5141\u8bb8\u7a7a\u6807\u9898\u3002<\/li>\n<li>\u65e5\u5fd7\uff1a\u975e\u8be6\u7ec6\u6a21\u5f0f\u663e\u793a <code>\u21a9\ufe0f<\/code>\/<code>\u2705<\/code>\uff1b\u8be6\u7ec6\u6a21\u5f0f\u5305\u542b\u5927\u5c0f\u548c\u6e90\u8def\u5f84\/URL\u3002<\/li>\n<\/ul>\n<h2>\u81ea\u52a8\u56de\u590d\u7ba1\u9053<\/h2>\n<ul>\n<li><code>getReplyFromConfig<\/code> \u8fd4\u56de <code>{ text?, mediaUrl?, mediaUrls? }<\/code>\u3002<\/li>\n<li>\u5f53\u5b58\u5728\u5a92\u4f53\u65f6\uff0c\u7f51\u9875\u53d1\u9001\u5668\u4f7f\u7528\u4e0e <code>openclaw message send<\/code> \u76f8\u540c\u7684\u7ba1\u9053\u89e3\u6790\u672c\u5730\u8def\u5f84\u6216 URL\u3002<\/li>\n<li>\u5982\u679c\u63d0\u4f9b\u591a\u4e2a\u5a92\u4f53\u6761\u76ee\uff0c\u5219\u6309\u987a\u5e8f\u53d1\u9001\u3002<\/li>\n<\/ul>\n<h2>\u5165\u7ad9\u5a92\u4f53\u5230\u547d\u4ee4\uff08Pi\uff09<\/h2>\n<ul>\n<li>\u5f53\u5165\u7ad9\u7f51\u9875\u6d88\u606f\u5305\u542b\u5a92\u4f53\u65f6\uff0cOpenClaw \u4e0b\u8f7d\u5230\u4e34\u65f6\u6587\u4ef6\u5e76\u66b4\u9732\u6a21\u677f\u53d8\u91cf\uff1a<\/li>\n<li><code>{{MediaUrl}}<\/code> \u5165\u7ad9\u5a92\u4f53\u7684\u4f2a URL\u3002<\/li>\n<li><code>{{MediaPath}}<\/code> \u8fd0\u884c\u547d\u4ee4\u524d\u5199\u5165\u7684\u672c\u5730\u4e34\u65f6\u8def\u5f84\u3002<\/li>\n<li>\u5f53\u542f\u7528\u6bcf\u4f1a\u8bdd Docker \u6c99\u7bb1\u65f6\uff0c\u5165\u7ad9\u5a92\u4f53\u88ab\u590d\u5236\u5230\u6c99\u7bb1\u5de5\u4f5c\u533a\uff0c<code>MediaPath<\/code>\/<code>MediaUrl<\/code> \u88ab\u91cd\u5199\u4e3a\u76f8\u5bf9\u8def\u5f84\u5982 <code>media\/inbound\/&lt;filename&gt;<\/code>\u3002<\/li>\n<li>\u5a92\u4f53\u7406\u89e3\uff08\u5982\u679c\u901a\u8fc7 <code>tools.media.*<\/code> \u6216\u5171\u4eab\u7684 <code>tools.media.models<\/code> \u914d\u7f6e\uff09\u5728\u6a21\u677f\u5316\u4e4b\u524d\u8fd0\u884c\uff0c\u53ef\u4ee5\u5c06 <code>[Image]<\/code>\u3001<code>[Audio]<\/code> \u548c <code>[Video]<\/code> \u5757\u63d2\u5165 <code>Body<\/code>\u3002<\/li>\n<li>\u97f3\u9891\u8bbe\u7f6e <code>{{Transcript}}<\/code> \u5e76\u4f7f\u7528\u8f6c\u5f55\u8fdb\u884c\u547d\u4ee4\u89e3\u6790\uff0c\u56e0\u6b64\u659c\u6760\u547d\u4ee4\u4ecd\u7136\u6709\u6548\u3002<\/li>\n<li>\u89c6\u9891\u548c\u56fe\u50cf\u63cf\u8ff0\u4fdd\u7559\u4efb\u4f55\u6807\u9898\u6587\u672c\u7528\u4e8e\u547d\u4ee4\u89e3\u6790\u3002<\/li>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u53ea\u5904\u7406\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u56fe\u50cf\/\u97f3\u9891\/\u89c6\u9891\u9644\u4ef6\uff1b\u8bbe\u7f6e <code>tools.media.&lt;cap&gt;.attachments<\/code> \u4ee5\u5904\u7406\u591a\u4e2a\u9644\u4ef6\u3002<\/li>\n<\/ul>\n<h2>\u9650\u5236\u4e0e\u9519\u8bef<\/h2>\n<p><strong>\u51fa\u7ad9\u53d1\u9001\u4e0a\u9650\uff08WhatsApp \u7f51\u9875\u53d1\u9001\uff09<\/strong><\/p>\n<ul>\n<li>\u56fe\u50cf\uff1a\u91cd\u65b0\u538b\u7f29\u540e\u7ea6 6 MB \u4e0a\u9650\u3002<\/li>\n<li>\u97f3\u9891\/\u8bed\u97f3\/\u89c6\u9891\uff1a16 MB \u4e0a\u9650\uff1b\u6587\u6863\uff1a100 MB \u4e0a\u9650\u3002<\/li>\n<li>\u8d85\u5927\u6216\u65e0\u6cd5\u8bfb\u53d6\u7684\u5a92\u4f53 \u2192 \u65e5\u5fd7\u4e2d\u6709\u660e\u786e\u9519\u8bef\uff0c\u56de\u590d\u88ab\u8df3\u8fc7\u3002<\/li>\n<\/ul>\n<p><strong>\u5a92\u4f53\u7406\u89e3\u4e0a\u9650\uff08\u8f6c\u5f55\/\u63cf\u8ff0\uff09<\/strong><\/p>\n<ul>\n<li>\u56fe\u50cf\u9ed8\u8ba4\uff1a10 MB\uff08<code>tools.media.image.maxBytes<\/code>\uff09\u3002<\/li>\n<li>\u97f3\u9891\u9ed8\u8ba4\uff1a20 MB\uff08<code>tools.media.audio.maxBytes<\/code>\uff09\u3002<\/li>\n<li>\u89c6\u9891\u9ed8\u8ba4\uff1a50 MB\uff08<code>tools.media.video.maxBytes<\/code>\uff09\u3002<\/li>\n<li>\u8d85\u5927\u5a92\u4f53\u8df3\u8fc7\u7406\u89e3\uff0c\u4f46\u56de\u590d\u4ecd\u7136\u4f7f\u7528\u539f\u59cb\u6b63\u6587\u901a\u8fc7\u3002<\/li>\n<\/ul>\n<h2>\u6d4b\u8bd5\u8bf4\u660e<\/h2>\n<ul>\n<li>\u8986\u76d6\u56fe\u50cf\/\u97f3\u9891\/\u6587\u6863\u60c5\u51b5\u7684\u53d1\u9001 + \u56de\u590d\u6d41\u7a0b\u3002<\/li>\n<li>\u9a8c\u8bc1\u56fe\u50cf\u7684\u91cd\u65b0\u538b\u7f29\uff08\u5927\u5c0f\u9650\u5236\uff09\u548c\u97f3\u9891\u7684\u8bed\u97f3\u6d88\u606f\u6807\u5fd7\u3002<\/li>\n<li>\u786e\u4fdd\u591a\u5a92\u4f53\u56de\u590d\u4f5c\u4e3a\u987a\u5e8f\u53d1\u9001\u6247\u51fa\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u56fe\u50cf\u548c\u5a92\u4f53\u652f\u6301 \u56fe\u50cf\u4e0e\u5a92\u4f53\u652f\u6301 \u2014 2025-12-05 WhatsApp \u6e20\u9053\u901a\u8fc7 Baileys Web  [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-176","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=176"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":471,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/176\/revisions\/471"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}