Design LINE Imagemap (Rich Message)
line_design_imagemapConstruct and validate a LINE Imagemap message JSON with tappable areas and optional video. Pre-host images at a public HTTPS URL; this tool builds the message object for sending via line_send_message.
Instructions
Build a validated Imagemap message (LINE OA Manager calls this a "Rich Message") and return it as JSON, ready to hand to line_send_message. DESIGN ONLY — this never calls the LINE API; it just builds + validates the message object.
Image hosting (read carefully):
LINE has NO imagemap-image upload API. You MUST pre-host the image yourself at a public HTTPS base_url.
At send time LINE fetches sized variants:
${base_url}/1040,/700,/460,/300,/240. Host all of them (or a server that serves the right size per suffix).baseSize.width is always forced to 1040. You only provide base_height (the image height when width = 1040). All area coordinates are px on that 1040-wide canvas.
Args:
base_url: HTTPS base URL of the hosted image set (≤1000 chars).
alt_text: Fallback text (1..400 chars).
base_height: Integer image height at width 1040.
areas: ≥1 tappable area, each { bounds: { x, y, width, height (ints) }, action: { type:"uri", uri, label? } | { type:"message", text, label? } }. Areas must fit inside 1040 × base_height.
video: optional { original_content_url, preview_image_url, area, external_link? }.
Returns: { message: , usage_hint: string }
Composability:
Build here → grab
message→ send via line_send_message (raw message passthrough).
Examples:
"Rich Message โปรโมชั่น ครึ่งบน-ครึ่งล่าง กดไปคนละลิงก์" → { base_url: "https://cdn.example.com/promo", alt_text: "โปรโมชั่นเดือนนี้", base_height: 1040, areas: [ { bounds: { x: 0, y: 0, width: 1040, height: 520 }, action: { type: "uri", uri: "https://shop.example.com/a" } }, { bounds: { x: 0, y: 520, width: 1040, height: 520 }, action: { type: "uri", uri: "https://shop.example.com/b" } } ] }
Errors:
base_url ต้องเป็น HTTPS → fix the URL scheme
พื้นที่เกินขอบรูป → an area's x+width or y+height exceeds 1040 × base_height
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_url | Yes | HTTPS base URL of the pre-hosted image set. LINE requests /1040 /700 /460 /300 /240 from it. No upload API — you must host the images yourself. | |
| alt_text | Yes | Fallback text shown when the image can't render (≤400 chars). | |
| base_height | Yes | Image height in px WHEN the width is 1040 (width is always forced to 1040). | |
| areas | Yes | At least 1 tappable area. Bounds are px on the 1040-wide base; must stay in bounds. | |
| video | No | Optional inline video that plays over part of the image. |