ImageViewHelper extends AbstractTagBasedViewHelper
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:image>
FinalYes
ViewHelper to resize, crop or convert a given image (if required) and render the corresponding HTML `<img>` tag showing the processed image.
Works for images within FAL storages, as well as system resources shipped with an extension and referenced via an EXT:/PKG: identifier. A system resource has none of FAL's stored metadata (crop, alt, title, ...), so it only ever uses this ViewHelper's own arguments for those.
External URLs are not processed.
<f:image src="EXT:myext/Resources/Public/typo3_logo.png" width="100c" />
<f:image fileExtension="webp" image="{imageObject}" maxWidth="400" maxHeight="400" />
Tags
Table of Contents
Properties
- $tagName : string
Methods
- __construct() : mixed
- initializeArguments() : void
- render() : string
- Resizes a given image (if required) and renders the respective img tag.
Properties
$tagName
protected
string
$tagName
= 'img'
Methods
__construct()
public
__construct(ImageSourceResolver $imageSourceResolver) : mixed
Parameters
- $imageSourceResolver : ImageSourceResolver
initializeArguments()
public
initializeArguments() : void
render()
Resizes a given image (if required) and renders the respective img tag.
public
render() : string