You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library offers extensive functionality and simplifies the transition from legacy <img> tags to the modern <picture> tags. While I appreciate the push towards using <picture>, there are numerous scenarios where explicitly setting image sizes is beneficial.
Currently, the <picture> tag inherits the original image size from the <img> tag, affecting the resulting container as well. So every image insertion will have the original image's size on website in some cases. Although reverting to the legacy implementation is an option, it undermines the benefits of upgrading from django-stdimage to django-pictures.
What do you think about adding an ability to set explicit image size from template tag?
<imgsrc="{{ field_file.url }}" alt="{{ alt }}" width="{{ field_file.width }}" height="{{ field_file.height }}"{%include 'pictures/attrs.html' with attrs=img_attrs%}>
When we move, the height and width attributed to the img_attrs dictionary as defaults, they can be overwritten via {% picture foo.bar img_height=600 img_height=800 %}
Hi @codingjoe,
The library offers extensive functionality and simplifies the transition from legacy
<img>
tags to the modern<picture>
tags. While I appreciate the push towards using<picture>
, there are numerous scenarios where explicitly setting image sizes is beneficial.Currently, the
<picture>
tag inherits the original image size from the<img>
tag, affecting the resulting container as well. So every image insertion will have the original image's size on website in some cases. Although reverting to the legacy implementation is an option, it undermines the benefits of upgrading from django-stdimage to django-pictures.What do you think about adding an ability to set explicit image size from template tag?
Originally posted by @atnartur in #147 (comment)
The text was updated successfully, but these errors were encountered: