Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.
This repository was archived by the owner on Apr 21, 2021. It is now read-only.

{{picture::*}}-Inserttag not using width and height parameter #475

@ghost

Description

Issue by @UB3RL33T
November 21st, 2017, 12:35 GMT

Using the Picture-Tag I have noticed that, even if there are width and height parameters passed, the image will be displayed with it's natural width and height.

{{picture::[imageOrUuid]?width=800&height=400&alt=sometext}}

Will ignore the passed width and height and use the images natural size.

Upon further investigation I have found that in
https://github.com/contao/core/blob/3e41ad8718f6dea9c10c8a9b0341ed86f2bbe2ae/system/modules/core/library/Contao/InsertTags.php#L1040
The Picture::create is being called with 0-values as $width and $height.
This seems to be a bug as the documentation states, that width and height parameters can be passed to {{picture::*}}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions