getImageDimensions
Probe image URLs to retrieve width, height, format, aspect ratio, and orientation (landscape/portrait/square). Verifies image suitability for feature image fields before committing.
Instructions
Probe an image URL and return its dimensions + orientation. - Wrapper-native synthetic tool. Range-GETs the first 64KB of an image URL and parses JPG/PNG header bytes to return width, height, format, aspect_ratio, and orientation (landscape | portrait | square). Does NOT proxy to BD. Used by content-creation skills to verify image orientation before committing to a feature-image field (post_image, cover_photo, hero_image).
Batch mode — preferred for 2+ candidates: pass urls (comma-separated, up to 50) instead of url. All URLs probe in parallel; the response is one envelope { status: "success", count, results: [{ url, status, message }, ...] } in input order. A 404/timeout/parse failure is that URL's own status: "error" entry — it never breaks the batch or the other results.
Caller contract: filter candidate URLs to .jpg / .jpeg / .png BEFORE calling. WebP / GIF / AVIF are unsupported — the parser returns { status: "error", message: "unsupported image format..." } as a defense-in-depth fallback, but callers must not rely on it; skip non-JPG/PNG extensions outright per Rule: Image dimensions. Any error response (404, timeout, parse fail, unsupported format) means drop the candidate and pick another.
See also: Rule: Image dimensions, Rule: Image dedup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Single bare canonical image URL (e.g. `https://images.pexels.com/photos/<id>/pexels-photo-<id>.jpeg`). Must respond with HTTP 200/206 to a Range request for the first 64KB. Provide `url` OR `urls`. | |
| urls | No | Batch mode: comma-separated bare image URLs, up to 50. Probed in parallel; one response carries per-URL results in input order — a failed URL is its own error entry and never breaks the batch. Preferred whenever vetting 2+ candidates. |