I have a django model that I can use to dynamically load/generate images from non standard formats into numpy arrays which I convert to a PIL image and I can display.
class Thing(models.Model):
def gethttpimage(self):
img = ....
# get find file and load into numpy array as img
image = Image.fromarray(img.astype(np.uint8))
response = HttpResponse(content_type="image/png")
image.save(response, "PNG")
return response
I also have a view that passes this response to a URL which works great.
I want to use a package such as django-imagekit or django-photologue to display my generated images as thumbnails galleries, etc and use the various other features imagekit offers.
How can I accomplish this with django-imagekit or django-photologue?
EDIT: I don't have my heart set on imagekit. I want to be able to build views with image galleries, as well as other information