Feature: #101391 - Add base64 attribute to ImageViewHelper
See forge#101391
Description
The ViewHelpers <f:image> and
<f:uri.image> now
support the attribute
base64="true"
that will provide
a possibility to return the value of the image's
src
attribute
encoded in base64.
<f:image base64="true" src="EXT:backend/Resources/Public/Images/typo3_logo_orange.svg" height="20" class="pr-2" />
<img src="{f:uri.image(base64: 'true', src:'EXT:backend/Resources/Public/Images/typo3_logo_orange.svg')}">
Copied!
Will result in the according HTML tag providing the image encoded in base64.
<img class="pr-2" src="data:image/svg+xml;base64,PHN2...cuODQ4LTYuNzU3Ii8+Cjwvc3ZnPgo=" alt="" width="20" height="20">
<img src="data:image/svg+xml;base64,PHN2...cuODQ4LTYuNzU3Ii8+Cjwvc3ZnPgo=">
Copied!
This can be particularly useful inside \TYPO3\
or
to prevent unneeded HTTP calls.