Skip to content

variable alt attribute for thumbnail #508

Open
@TobitRE

Description

@TobitRE

Hi,

how can I use a variable inside the thumbnail template tag?
I am following the tutorial:

{% load imagekit %}
{% generateimage 'myapp:thumbnail' source=source_file -- alt="A picture of Me" id="mypicture" %}

this works fine but now I want to fill the alt attribute with a variable.

I try it with a {% with %} condition and without. Nothing works. The image tag include the variable name without replacing it by the value.

thanks for helping.

best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions