django-imagekit
django-imagekit copied to clipboard
Add options as ImageSpec init paramaters
Would it be possible to add the options as an init paramters in ImageSpec class? Do you see problem with doing something like this:
def __init__(self, source,options=None):
self.source = source
if self.options :
self.options = options
super(ImageSpec, self).__init__()
I can't think of any issues off the top of my head, but we'd have to add tests to make sure that serialization wasn't messed up at all. I guess if we did that, we'd also want to add processors, format, etc.
We added a class on top with this and it's working fine, but we're not using serialization or such so it might not be functionnal for everything :)
The purpose was to set qualitfy according to file size if you're wondering :)
Thanks