forked from mirrors/bookwyrm
Fixes image federation
This commit is contained in:
parent
2beaa0f0b7
commit
8ef1d0d3ac
1 changed files with 3 additions and 1 deletions
|
@ -11,8 +11,10 @@ from django.core.exceptions import ValidationError
|
|||
from django.core.files.base import ContentFile
|
||||
from django.db import models
|
||||
from django.forms import ClearableFileInput, ImageField as DjangoImageField
|
||||
from django.templatetags.static import static
|
||||
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 +356,7 @@ def image_serializer(value, alt):
|
|||
url = value.url
|
||||
else:
|
||||
return None
|
||||
url = "https://%s%s" % (DOMAIN, url)
|
||||
url = static(url)
|
||||
return activitypub.Document(url=url, name=alt)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue