Skip to content
Snippets Groups Projects
Commit 97c0da20 authored by Claus Due's avatar Claus Due Committed by Morton Jonuschat
Browse files

[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: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarOliver Eglseder <oliver.eglseder@in2code.de>
Tested-by: default avatarOliver Eglseder <oliver.eglseder@in2code.de>
Reviewed-by: default avatarSteffen Müller <typo3@t3node.com>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
parent 3bbeb33b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment