X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FMediaTransformOutput.php;h=c49d3f2094869ae6f0966d3e62c27934ff2bdd4f;hb=667a6c3dee132d6e26a648a77983513cca1f56b2;hp=86323993fd668948ff31b321044bfdd78edec33d;hpb=5b0939fa1956f5bc2c936510c64395d9c74ac739;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/MediaTransformOutput.php b/includes/media/MediaTransformOutput.php index 86323993fd..c49d3f2094 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -209,7 +209,7 @@ abstract class MediaTransformOutput { if ( $this->page && $this->page !== 1 ) { $query['page'] = $this->page; } - if( $this->lang ) { + if ( $this->lang ) { $query['lang'] = $this->lang; } @@ -298,6 +298,8 @@ class ThumbnailImage extends MediaTransformOutput { * valign vertical-align property, if the output is an inline element * img-class Class applied to the \ tag, if there is such a tag * desc-query String, description link query params + * override-width Override width attribute. Should generally not set + * override-height Override height attribute. Should generally not set * custom-url-link Custom URL to link to * custom-title-link Custom Title object to link to * custom target-link Value of the target attribute, for custom-target-link @@ -359,6 +361,12 @@ class ThumbnailImage extends MediaTransformOutput { if ( !empty( $options['img-class'] ) ) { $attribs['class'] = $options['img-class']; } + if ( isset( $options['override-height'] ) ) { + $attribs['height'] = $options['override-height']; + } + if ( isset( $options['override-width'] ) ) { + $attribs['width'] = $options['override-width']; + } // Additional densities for responsive images, if specified. if ( !empty( $this->responsiveUrls ) ) {