Single topic API endpoint should contain `image_url`

When you fetch a list of all topics with a certain tag (e.g., each topic contains an image_url field. If you fetch, however, only one topic (e.g. it does not contain an image_url field. This is kind of inconsistent and it would help me a lot if it was available. Can you maybe add it?

My workaround for the time being is:

response.image_url = (response.post_stream.posts[0].cooked
  .match(/src=\"(.+?)\"/) || [])[1]

I’ve just come across this post looking for the same thing.

Does anyone know if there’s a way of adding this (e.g. with a plugin)?

1 Like

I created a commit that adds the image_url to the topic serializer:


Brilliant! Thanks @blake! :+1:

1 Like

Can i use: /search.json?q=loreal&image_url=true

I want to display image_url in the json results I return when searching for the topic