[Answer]-Django how to use template tag – Imagekit app

1👍

source_image needs to be a file object. (For example, a_user_profile.photo.)

It may not be super clear but it is in the docs:

Additional keyword-style arguments are passed to the registered generator class. As we saw above, image spec constructors expect a source keyword argument, so that’s what we need to pass to use our thumbnail spec

And earlier:

source_file = open('/path/to/myimage.jpg')
image_generator = Thumbnail(source=source_file)
result = image_generator.generate()

If you can think of some wording that’ll make this more clear, please submit a pull request!

Leave a comment