django-imagekit icon indicating copy to clipboard operation
django-imagekit copied to clipboard

how can pass height and width to the templatetag

Open harshjadon9 opened this issue 4 years ago • 0 comments

views.py

class imagess(ImageSpec):
    processors = [SmartResize(100,100)]
    format = 'JPEG'
    options = {'quality': 100}

register.generator('main:imagess', imagess)

index.html

{% generateimage 'main:imagess' source=source_file %} this generates a image of height 100 x 100

how can pass/define a custom height and width for the generated image from the HTML file....like

{% generateimage 'main:imagess' source=source_file height=1080 width=720 %}

harshjadon9 avatar Jan 30 '21 18:01 harshjadon9