Refactor ImageObject schema to remove license metadata

This commit is contained in:
Joakim Hellsén 2026-03-17 16:24:28 +01:00
commit f04d88e8fd
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
2 changed files with 4 additions and 23 deletions

View file

@ -79,7 +79,7 @@ def _build_image_object(
*,
copyright_notice: str | None = None,
) -> dict[str, Any]:
"""Build a Schema.org ImageObject with attribution and license metadata.
"""Build a Schema.org ImageObject with attribution metadata.
Args:
request: The HTTP request used for absolute URL building.
@ -96,14 +96,13 @@ def _build_image_object(
"name": creator_name,
"url": creator_url,
}
return {
"@type": "ImageObject",
"contentUrl": request.build_absolute_uri(image_url),
"creditText": creator_name,
"copyrightNotice": copyright_notice or creator_name,
"creator": creator,
"license": creator_url,
"acquireLicensePage": creator_url,
}