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.

5 min readSume
All posts

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.

Google image SEO best practices (read 2026-10-03)
TopicGuidance
FormatsBMP, GIF, JPEG, PNG, WebP, SVG, AVIF
FilenamesShort and descriptive
Alt textUseful and in context, no keyword stuffing
MarkupUse img elements, not CSS background images, for discovery
Responsive imagesAlways provide a fallback src with srcset
DiscoveryImage 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

All Developers posts

Written by Sume