[BUGFIX] Invalid file used to compute image ratio in text with picture

Fixes: #57075
Releases: 6.2
Change-Id: Ided1204857dabf4fb15045056cc8a14010a53ae9
Reviewed-on: https://review.typo3.org/28558
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs
Reviewed-by: Markus Klein
Tested-by: Markus Klein