[BUGFIX] Fallback to argument values in f:image/f:media on invalid dimensions 38/44138/8
authorClaus Due <claus@namelesscoder.net>
Sun, 18 Oct 2015 02:10:27 +0000 (04:10 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 13 Nov 2015 18:13:04 +0000 (19:13 +0100)
commit97c0da203f5d75ae5ddf527b02948d5264cc612d
tree43da1b8daf750ff2cb70df8641dec3685dcf0da9
parent3bbeb33b59789e81c64d81df0f84b6a5149f70e8
[BUGFIX] Fallback to argument values in f:image/f:media on invalid dimensions

* Check which width/height to use; the ones from arguments or the
  ones returned after image scaling (uses original if different).
* Do not apply the "width" and "height" attributes if resolved
  dimensions are empty.

The effect is that if the ViewHelper is used with dimensions on a
site that does *NOT* support image resizing, rather than output an
invalid tag (with width/height being zero or full size of image)
it now outputs a tag where width/height is set to the (numeric part
of the) value of the width/height arguments.

Long story short: if the server can't scale images the browser can.

Change-Id: I8bcaa5954a7f71d16656b85789b6d7d63298a0d8
Resolves: #54772
Resolves: #40254
Releases: master
Reviewed-on: https://review.typo3.org/44138
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Oliver Eglseder <oliver.eglseder@in2code.de>
Tested-by: Oliver Eglseder <oliver.eglseder@in2code.de>
Reviewed-by: Steffen Müller <typo3@t3node.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/MediaViewHelper.php