ImageViewHelper
final class \
- Extends
- AbstractViewHelper
See also
This class is the implementation of a Fluid ViewHelper. View it in the TYPO3 ViewHelper reference: <f:uri.image>
ViewHelper to resize, crop or convert a given image (if required) and return the URL to this processed file.
This ViewHelper 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, title, ...), so it only ever uses this ViewHelper's own arguments for that.
For an extension resource that should not go through image processing at all,
use <f:uri.resource> instead.
External URLs are not processed and just returned as is.
<f:uri.image src="{variableWithFileadminLocation}" width="100c" />
<f:uri.image src="EXT:myext/Resources/Public/typo3_logo.png" width="100c" />
<f:uri.image image="{imageObject}" maxWidth="400" maxHeight="400" fileExtension="webp" />
Tags
Table of Contents
Methods
- __construct() : mixed
- initializeArguments() : void
- render() : string
- Resizes the image (if required) and returns its path. If the image was not resized, the path will be equal to $src
Methods
__construct()
public
__construct(ImageSourceResolver $imageSourceResolver) : mixed
Parameters
- $imageSourceResolver : ImageSourceResolver
initializeArguments()
public
initializeArguments() : void
render()
Resizes the image (if required) and returns its path. If the image was not resized, the path will be equal to $src
public
render() : string