Google Images formats and filenames for Sume output
Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF in img src, and wants short filenames and real alt text. Rename Sume downloads first.

Google Search Central lists the formats it supports in an img src: BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. It recommends short descriptive filenames such as my-new-black-kitten.jpg over image1.jpg, alt text that describes the image in context, standard img elements instead of CSS backgrounds, and an image sitemap. A Sume download is a signed URL with an opaque path, so you rename it when you save it.
What the page recommends
None of these are ranking promises; the page frames them as best practice for discovery and quality.
| Topic | Guidance |
|---|---|
| Formats | BMP, GIF, JPEG, PNG, WebP, SVG, AVIF |
| Filenames | Short and descriptive |
| Alt text | Useful and in context, no keyword stuffing |
| Markup | Use img elements, not CSS background images, for discovery |
| Responsive images | Always provide a fallback src with srcset |
| Discovery | Image sitemap, primaryImageOfPage or og:image |
What Sume returns
A successful POST /v1/images returns data[].url, a Sume-hosted signed URL, and media_type for each image. The docs say the URLs are signed and Sume mirrors the generated media; they do not describe them as permanent, so copy the bytes to your own storage with a name of your choosing. Choose output_format from png, jpeg, webp or svg per model; webp is a supported Google format and usually lighter than PNG for photographs.
Save with a real name
The script slugifies a short description into the filename and uses the same description, lightly edited, as alt text. Write alt text for what the image shows in the page, not a keyword list.
import os, io, requests
from PIL import Image
r = requests.post(
"https://api.sume.com/v1/images",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
json={"model": "bytedance-seed/seedream-4.5", "aspect_ratio": "4:3", "prompt": "ceramic mug of coffee on a wooden table, soft window light", "output_format": "webp"},
timeout=90,
)
r.raise_for_status()
if r.status_code != 200:
raise SystemExit("202: read the finished job from /v1/jobs/{id}/result")
img = Image.open(io.BytesIO(requests.get(r.json()["data"][0]["url"], timeout=60).content))
import re
alt = "Ceramic mug of coffee on a wooden table in window light"
name = re.sub(r"[^a-z0-9]+", "-", alt.lower()).strip("-")[:60] + ".webp"
img.save(name, "WEBP", quality=85)
print(f'<img src="/images/{name}" alt="{alt}" width="{img.width}" height="{img.height}">')Alt text that is not a prompt
The prompt you sent to an image model is a poor alt text. It describes how to make the picture, with style words and camera terms, while alt text should say what a visitor would see in the page's context. Google's guidance is useful, information-rich text without keyword stuffing, and its example is "Dalmatian puppy playing fetch" in place of a run of repeated terms. Write the alt text after you have looked at the result, since the model may have changed details. Store the prompt, the model id and the usage.cost in your own records so the image can be traced and re-created later, but keep them out of the page markup. If the image is purely decorative, an empty alt attribute is the usual choice, and that is a separate decision from file naming.
Notes
Re-encoding a WebP loses a little quality; if you want the original bytes, write the downloaded content straight to disk instead of through Pillow. The width and height attributes in the printed tag matter for layout stability, because the browser can reserve the space before the file loads. If the image is AI-generated and published for commerce, check the platform's own disclosure rules separately.
Keep a mapping from the final filename back to the request that made it, so you can find the model and cost later without putting that detail in the page.
Sources
Related posts
More in Developers
- Google Play app icon: 512x512 32-bit PNG with alpha, 1024 KB
Play wants a 512 x 512, 32-bit PNG with alpha, at most 1024 KB. Get a transparent square from ChatGPT Image 2.5 on Sume, then resize and check the size.
- Google Play screenshots: 9:16 at 1080x1920, side limit 2x
Play screenshots need 320 to 3840 px and a long side at most twice the short side. Four 1080 x 1920 9:16 shots also meet the promo eligibility note on the page.
- Goose 1.52 recipe consent before extensions: a Sume MCP recipe
Goose 1.52 asks for recipe consent before session/new spawns extensions, and caps recipe size. What to put in a recipe that uses Sume's MCP server.
- got maxRetryAfter and 429: rate_limited vs queue_full on Sume
got retries 429 and honors Retry-After up to maxRetryAfter. Sume sends 429 for rate_limited and for queue_full, which need different waits. Here is the split.
Written by Sume