Community影像github.com

LinkedIn 媒體素材準備工具

轉換、裁切、調整尺寸及壓縮圖片與影片,以符合 LinkedIn 最佳上傳品質與檔案大小。當使用者需要為 LinkedIn 準備照片、圖片或影片(個人照片、封面照片、貼文圖片、文章精選圖片、貼文影片或影片廣告)、最佳化檔案大小、裁切與調整尺寸以符合 LinkedIn 尺寸規範、轉換 HEIC/RAW/PNG/MOV 為 LinkedIn 適用的 JPEG 或 MP4,或提及 LinkedIn 媒體需求、規格或限制時使用。

LinkedIn 媒體素材準備工具 是什麼?

這項技能提供完整的影像與影片處理流程,專為 LinkedIn 各類媒體格式設計。它涵蓋了個人照片、封面照片、貼文圖片、文章精選圖片、貼文影片及影片廣告等所有常見使用情境,並透過表格清楚列出每種用途的正確尺寸、比例與檔案限制。對於圖片,它支援從原始檔案檢查、EXIF 方向修正、HEIC 等格式轉換、使用者迭代裁切,到最終縮放與壓縮的完整步驟,並提供對應的 ImageMagick (`magick`) 與 macOS `sips` 指令。對於影片,它從使用 `ffprobe` 檢查來源資訊開始,處理 iPhone 等行動裝置常見的旋轉標籤,並提供三種目標格式(正方形、橫向、直式)的濾鏡鏈範本與完整 FFmpeg 指令。技能同時包含實用的選擇指南(例如何時使用直式、橫式或正方形影片),並強調最終驗證步驟以確保輸出符合 LinkedIn 的上傳規範。此技能支援 macOS、Linux 與 Windows(需安裝 ImageMagick 與 FFmpeg),提供開發者與進階使用者一個可重複執行的腳本化工作流程。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/getedgehq/skills/tree/main/linkedin-media-prep

Installed? Explore more 影像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

LinkedIn 媒體素材準備工具 是做什麼的?

為 LinkedIn 準備任何圖片或影片,確保正確的尺寸、裁切與壓縮。


圖片規格

使用情境尺寸比例備註
貼文(直式,最大動態佔比)1080 × 13504:5預設選擇 適用於照片
貼文(橫式)1200 × 6271.91:1適用於橫幅、螢幕截圖
貼文(正方形)1080 × 10801:1安全通用的選擇
貼文(4:3)1440 × 10804:3適用於相機原生照片
個人照片400 × 400 最小1:1建議使用 800 × 800
封面照片1584 × 3964:1
文章精選圖片1200 × 6271.91:1
最大檔案大小8 MB—目標 < 1 MB 以加快上傳
格式JPEG, PNG, GIF—JPEG 優先 適用於照片

影片規格

使用情境尺寸比例備註
貼文(正方形)1080 × 10801:1安全通用的選擇
貼文(橫式)1920 × 108016:9標準動態牆影片
貼文(直式)1080 × 19209:16行動裝置/Reels 風格;若來源非 9:16 則需填補
最大檔案大小5 GB—目標 < 200 MB 以加快上傳
最長時長30 分鐘—最短 3 秒
格式MP4 (H.264 + AAC)—MP4 為必要 以獲得最佳相容性
影格率30 fps—符合來源或統一為 30 fps
像素格式yuv420p—為廣泛播放支援所必需

圖片工作流程

1. 檢查來源

sips -g pixelWidth -g pixelHeight "<input>"
ls -lh "<input>"

2. 修正 EXIF 方向(如有需要)

iPhone 與手機照片通常以 EXIF 方向標籤儲存直式影像,而非旋轉像素。ImageMagick 通常會自動處理此問題,但如果轉換後影像顯示為側向,您可以在裁切前強制將其轉正。

magick "<input>" -auto-orient "<input>-upright.png"

使用轉正後的版本作為裁切的工作副本。

3. 轉換為可編輯格式

如果來源為 HEIC 或其他非 PNG 格式:

sips -s format png "<input>" --out "<input>.png"

使用 PNG 作為裁切的工作副本。

4. 裁切(與使用者迭代進行)

首次裁切: 居中,根據目標比例選擇尺寸。

對於從直式照片裁切為 4:5 直式貼文:

  • 裁切寬度 = 影像原始寬度
  • 裁切高度 = 寬度 × 5 / 4
  • Y 偏移量 = (原始高度 − 裁切高度) / 2

以 3024 × 4032 來源為例:

magick "source.png" -crop 3024x3780+0+126 "cropped.png"

迭代調整:

  • 「再放大一點」 → 縮小裁切 WxH(例如用 2000×2500 取代 3024×3780)。保持相同比例。
  • 「上方空間太多」 → 增加 Y 偏移量(將裁切區域向下移)。
  • 「下方空間太多」 → 減少 Y 偏移量(將裁切區域向上移)。
  • 「需要更寬/更窄」 → 調整 W 和 H,同時保持比例。

裁切公式:

magick "source.png" -crop <W>x<H>+<X>+<Y> "cropped.png"
# X = (原始寬度 − W) / 2  (居中)
# Y = 根據主體位置調整

5. 調整尺寸並壓縮以供 LinkedIn 使用

magick "cropped.png" -resize 1080x1350 -quality 85 "<name>-linkedin.jpg"

適用於個人照片:

magick "cropped.png" -resize 800x800 -quality 85 "<name>-linkedin-profile.jpg"

適用於封面照片:

magick "cropped.png" -resize 1584x396 -quality 85 "<name>-linkedin-cover.jpg"

適用於 4:3 貼文:

magick "source.png" -resize 1440x1080 -quality 85 "<name>-linkedin-4by3.jpg"

6. 驗證輸出

ls -lh "<output>.jpg"
sips -g pixelWidth -g pixelHeight "<output>.jpg"

確保:

  • 尺寸符合目標
  • 檔案大小 < 8 MB(最好 < 1 MB)
  • 品質可接受

應該選擇哪種影片格式?

來源方向您的目標建議目標
直式(手機影片)最大化行動裝置動態牆空間直式 1080×1920(若來源為 3:4 或 4:5 則填入黑色)
直式(手機影片)安全通用相容性正方形 1080×1080(中心裁切)
橫式(螢幕錄製、相機)標準動態牆影片橫式 1920×1080
橫式安全通用相容性正方形 1080×1080(中心裁切)
不確定—正方形 1080×1080

經驗法則: 正方形到處都能用。直式能獲得最大的行動裝置螢幕佔比,但在桌機上可能會有黑邊。橫式最適合示範、訪談與電影感內容。


影片工作流程

1. 檢查來源

ffprobe -v error -select_streams v:0 \
  -show_entries stream=width,height,avg_frame_rate,duration,bit_rate \
  -show_entries format=duration,size,bit_rate \
  -of csv=p=0 "<input>"

同時檢查旋轉元數據:

ffprobe -v error -select_streams v:0 -show_entries stream_side_data=display_matrix \
  -of default=nk=1:nw=1 "<input>"

2. 處理旋轉(iPhone / 手機來源)

手機影片通常以橫向儲存影格,並帶有旋轉標籤。在裁切/縮放之前,先在濾鏡鏈中套用 transpose。

顯示矩陣Transpose 值意義
-90° (270°)1順時針 90°
+90°2逆時針 90°
180°3180°
無旋轉省略—

3. 選擇目標並建立濾鏡鏈

正方形 (1080×1080) — 旋轉後中心裁切:

transpose=1,crop=1080:1080:(in_w-1080)/2:(in_h-1080)/2,format=yuv420p

橫式 (1920×1080) — 縮放至符合大小,然後填補,或中心裁切:

transpose=1,scale=1920:-2,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black,format=yuv420p

直式 (1080×1920) — 依寬度縮放,然後上下填補:

transpose=1,scale=1080:-2,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black,format=yuv420p

如果來源長寬比已經符合目標,則可省略 pad,直接使用 scale=1080:1080 或 scale=1920:1080。

4. 常用單行指令(直式 iPhone → 正方形)

最常見的需求:將直式 iPhone 影片轉換為 LinkedIn 適用的正方形 MP4。

ffmpeg -y -i "IMG_xxxx.MOV" \
  -vf "transpose=1,crop=1080:1080:(in_w-1080)/2:(in_h-1080)/2,format=yuv420p" \
  -c:v libx264 -profile:v main -level 4.2 -preset medium -crf 23 -r 30 \
  -c:a aac -b:a 128k -movflags +faststart \
  "output_linkedin_square.mp4"

將 transpose=1 替換為步驟 2 中的正確旋轉值,如果來源沒有旋轉元數據,則省略 transpose=1,。

5. 轉碼

ffmpeg -y -i "<input>" \
  -vf "<filter_chain>" \
  -c:v libx264 -profile:v main -level 4.2 -preset medium -crf 23 -r 30 \
  -c:a aac -b:a 128k \
  -movflags +faststart \
  "<output>.mp4"

參數說明:

  • -profile:v main -level 4.2 — 廣泛的裝置相容性
  • -crf 23 — 良好的品質/大小平衡(數值越低品質越高)
  • -r 30 — 標準化影格率
  • -movflags +faststart — 將 moov atom 放在檔案開頭,便於網路串流

6. 驗證輸出

ls -lh "<output>.mp4"
ffprobe -v error -select_streams v:0 \
  -show_entries stream=width,height,avg_frame_rate,duration,bit_rate \
  -show_entries format=duration,size,bit_rate \
  -of csv=p=0 "<output>.mp4"

確保:

  • 尺寸符合目標
  • 檔案大小合理,便於上傳(理想值 < 200 MB)
  • 無殘留旋轉元數據(播放器不應再次旋轉)

工具

  • 圖片: 優先使用 magick(ImageMagick 7)或 convert(ImageMagick 6)。在 macOS 上可退而使用 sips 進行基本格式轉換。透過 brew install imagemagick 安裝。
  • 影片: ffmpeg + ffprobe。透過 brew install ffmpeg 安裝。

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

getedgehq/agent-evals

Build evals for an AI agent that already does real work. Use when someone asks "how do I know my agent is right", wants to test an agent before trusting it, compare models on cost versus quality, or turn production failures into tests. Walks from first tasks and yes/no verifiers, to isolated environments, to a trace-driven improvement loop.

getedgehq/cli-ux-review

Audit a command-line tool for user-friendliness — clear situation / next-step / options in every output, colour-highlighted runnable commands, no raw jargon, no silent hangs. Invoke for "CLI UX audit", "review my CLI", "is this CLI intuitive", or before any CLI release.

getedgehq/generate-image

Generate images with OpenAI GPT Image 2 via the Codex CLI, billed through the user's ChatGPT Plus subscription (no OpenAI API key, no per-image API cost). Use when the user asks to create, generate, or make an image, picture, illustration, icon, hero graphic, or concept art from a text prompt.

getedgehq/harness-first

Diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

getedgehq/http-error-triage

Run before concluding anything from an HTTP error on a third-party API. Separates a real credential/entitlement problem from a CDN or WAF block, a wrong endpoint, or a client-signature ban. Use whenever an API returns 401/403/402/429 and you are about to say "the key is dead", "credits are exhausted", "the plan lacks access", or "we are rate limited".

getedgehq/monid

>-

getedgehq/opendraft

An 18-agent pipeline that turns one topic line into a drafted

getedgehq/people-search

Find and rank professional people for recruiting, partnerships, sales, or research from user-provided data, public web sources, an authenticated search session, or a connected provider. Use for people discovery, LinkedIn or Sales Navigator search design, profile-list ranking, or provider filter translation.

getedgehq/rocketlist

Turn a CV into a shortlist of live startup roles from Rocketlist's public job board, including adjacent job titles the person would never have searched for, each with its published salary, the evidence for the fit, and a direct apply link. Use for "find roles I would be a strong fit for", career pivots, remote or VC-backed job hunts, and salary-visible role discovery.

getedgehq/security-audit-checklist

Run a comprehensive security audit across application code, cloud infrastructure, containers, CI/CD pipelines, and infrastructure-as-code. Covers privacy compliance, OWASP basics, secret leakage, API security, IAM misconfigurations, storage exposure, Kubernetes hardening, and network security. Use when the user asks to audit, review, or harden app or cloud security, check for secrets, scan for XSS/SQLi, verify security headers, review Terraform/CloudFormation, audit AWS/GCP/Azure configs, or perform any security-focused review.

getedgehq/shadcn-first

>-

getedgehq/skills

Develop or review a branded long-form YouTube channel using Simon Kaiser's public creator-led approach: audience fit, recurring formats, natural brand integration, Time with Brand, and an organic, paid, and Shorts strategy. Use for channel strategy, format briefs, and pilots.

getedgehq/skills

Build a YouTube strategy, evidence-backed idea slate, and title plus thumbnail package using Paddy Galloway's public method. Use when planning a channel, choosing concepts, or preparing a video before filming.

getedgehq/skills

Build or review a buyer-centered strategic narrative using Andy Raskin's public method. Use for sales or investor deck stories, homepage positioning, keynotes, launch narratives, and why-now messaging.

getedgehq/skills

Turn a product URL, launch brief, or approved script into a production-ready launch video. Use for product reveals, feature announcements, SaaS launches, and narrated product films; not for generic explainers or editing existing footage.

getedgehq/strip-image-ai-metadata

Strip C2PA and AI-generation metadata from images (PNG, JPEG, WebP) to remove "Generated by AI" / "ChatGPT" / "DALL-E" labels that platforms like LinkedIn, Instagram, and X display. Use when the user wants to clean AI-generated images before posting, remove AI attribution from photos, strip C2PA manifests, sanitize image metadata for professional use, or verify whether an image contains C2PA data.

getedgehq/top-down-comms

>-

getedgehq/workplan

Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects

相關技能