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
{{ message }}
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.
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.
The documentation is actually wrong. The {{picture::*}} insert tag only supports size, alt, class, rel, and template, see contao/core#7635.
{{picture::*}} is meant for responsive images, which needs a size ID instead of width/height. If you want to pass width and height you should use the {{image::*}} insert tag.
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.
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::*}}.
The text was updated successfully, but these errors were encountered: