Skip to content

Override img[width] and img[height] attributes #176

@codingjoe

Description

@codingjoe

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions