diff --git a/engine/core/graphene/object_types.py b/engine/core/graphene/object_types.py index 12423275..9efe1081 100644 --- a/engine/core/graphene/object_types.py +++ b/engine/core/graphene/object_types.py @@ -235,7 +235,7 @@ class CategoryType(DjangoObjectType): # type: ignore [misc] return result def resolve_image(self: Category, info) -> str: - return self.image_url + return info.context.build_absolute_uri(self.image.url) if self.image else "" def resolve_markup_percent(self: Category, info) -> float: if info.context.user.has_perm("core.view_category"): @@ -466,8 +466,8 @@ class ProductImageType(DjangoObjectType): # type: ignore [misc] filter_fields = ["uuid"] description = _("product's images") - def resolve_image(self: ProductImage, _info): - return self.image_url + def resolve_image(self: ProductImage, info): + return info.context.build_absolute_uri(self.image.url) if self.image else "" class ProductType(DjangoObjectType): # type: ignore [misc]