Angolia and django rest framework not showing images

i tried querying using algolia but it didn’t return the complete url path for my local image on my server.

my current stack is django django-rest-framework

Hello and thank you for reaching out,

Clément from Algolia there,

If I understand correctly your issue:

  • You index your records from Django into Algolia
  • Your records contains an image attribute (coming from a Django model I guess?)
  • The image attribute do not contains a complete url pointing to the image.

Do I get it correctly?

To better understand your problem, could you give me an exemple of the Algolia record containing the image url?


Algolia is indexing part of my URL (“photo_main”) and not the full URL that is coming from my Django server. My images are coming from an aws s3 bucket, but the URL Algolia is using is not correct.

I am experiencing this exact issue with Algolia and Django

Hi @mxnunley1!

Chloe from the API Client team here.

Would you mind sharing with us the code snippets you’re using to retrieve your objects from AWS and sending them to Algolia please?

Have a good day!

My objects are not coming from aws, my objects are coming from my postgres database. My images are stored on an aws s3 bucket. I believe my be is that django indexing my information from the database which is saving the absolute urls of my images from aws S3.

Indeed I think it may be coming from your Model configuration, but not Algolia. Would you mind sharing with us your AlgoliaIndex model configuration? It might be possible that you didn’t use the Django field url to store your full image path