title: Django REST API to expose images
body: <p>I have a django app and I want to expose the model images, such that when I request <code>/image/school_id/400</code> it will return the image of school with id <code>school_id</code> cropped and resized to a box 400x400 px. Here is what I tried</p>
  
  <pre><code>@api_view(['GET', 'POST'])
  def image_view(request,  school_id, size):
  
      image = School.objects.get(school__pk=school_id).image
      resized_img = image #Handle resizing here
  
      return Response(resized_img, content_type='*/*')
  </code></pre>
  
  <p>and all am getting is an error <code>'utf8' codec can't decode byte 0xff in position 0: invalid start byte</code></p>
  
  <p>How do i return the image?
  Am using Django-rest-framework
  <a href="http://www.django-rest-framework.org/api-guide/renderers#advanced-renderer-usage" rel="noreferrer">http://www.django-rest-framework.org/api-guide/renderers#advanced-renderer-usage</a></p>