Merge remote-tracking branch 'upstream/main' into images-django-imagekit
This commit is contained in:
commit
843127efa8
84 changed files with 1633 additions and 1869 deletions
|
@ -13,6 +13,7 @@ from django.db import models
|
|||
from django.forms import ClearableFileInput, ImageField as DjangoImageField
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from bookwyrm import activitypub
|
||||
from bookwyrm.connectors import get_image
|
||||
from bookwyrm.sanitize_html import InputHtmlParser
|
||||
|
@ -354,7 +355,8 @@ def image_serializer(value, alt):
|
|||
url = value.url
|
||||
else:
|
||||
return None
|
||||
url = "https://%s%s" % (DOMAIN, url)
|
||||
if not url[:4] == "http":
|
||||
url = "https://{:s}{:s}".format(DOMAIN, url)
|
||||
return activitypub.Document(url=url, name=alt)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue