codingjoe / django-pictures

Responsive cross-browser image library using modern codes like AVIF & WebP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Styling / Class on picture tag

SebastianKapunkt opened this issue · comments

In order to fully support customizability in styling for the images, it should be possible to add style or class to each of those. The two tags that I see are: img and picture. For picture it's currently not possible.

@SebastianKapunkt are you interested in implementing this? The magic, on how we pass attributes, happens mostly here

else:
attrs[key] = value

and in the include here
<img src="{{ field_file.url }}" alt="{{ alt }}" width="{{ field_file.width }}" height="{{ field_file.height }}"{% include 'pictures/attrs.html' %}>