1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

Add option to set image_url ("background image") for user

While this option is not used anywhere in microblog.pub itself, some
other servers do occasionally use it when showing remote profiles.

Also, this image _can_ be used in microblog.pub - just add this:

	<img src="{{ local_actor.image_url }}">

in the appropriate place of your template!
This commit is contained in:
Alexey Shpakovsky
2022-11-10 22:43:33 +01:00
committed by Thomas Sileo
parent 4c995957a6
commit 4613997fe3
3 changed files with 14 additions and 0 deletions

View File

@ -154,6 +154,12 @@ if ALSO_KNOWN_AS:
if MOVED_TO:
ME["movedTo"] = MOVED_TO
if config.CONFIG.image_url:
ME["image"] = {
"mediaType": mimetypes.guess_type(config.CONFIG.image_url)[0],
"type": "Image",
"url": config.CONFIG.image_url,
}
class NotAnObjectError(Exception):
def __init__(self, url: str, resp: httpx.Response | None = None) -> None: