[BUGFIX] Do not resize same image over and over again

Change-Id: If485c8028c52be2a2c8dcc8d1bd72434537c4223
Fixes: #53633
Reviewed-on: https://review.typo3.org/25397
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers