Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable alt attribute for thumbnail #508

Open
TobitRE opened this issue Oct 13, 2020 · 0 comments
Open

variable alt attribute for thumbnail #508

TobitRE opened this issue Oct 13, 2020 · 0 comments

Comments

@TobitRE
Copy link

TobitRE commented Oct 13, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant