Transcoding action that resizes images that appear in the given HTML content to match the requesting device's list of supported image formats and screen size.
A few options may be set through a call to TranscodingAction::setOption() as needed:
- mobile_device: contains the DDR property reference that the transcoding
uses to tell whether the requesting device is mobile or not. The action
uses the is_wireless_device property of the WURFL namespace when the option
is not set.
- image_format_support: contains the DDR property reference that the action
uses to know the list of image formats supported by the requesting device.
The action uses the imageFormatSupport property of the DDR Core Vocabulary
when the option is not set.
- resolution_width: contains the DDR property reference that the action
uses to know the width of the screen of the requesting device.
The action uses the displayWidth property of the DDR Core Vocabulary
when the option is not set.
- resolution_height: contains the DDR property reference that the action
uses to know the height of the screen of the requesting device.
The action uses the displayHeight property of the DDR Core Vocabulary
when the option is not set.
- purge: purge the file cache when true. False by default.
- ratio: keep the ratio of the original image when true. True by default.
- img_cache: File path to the folder that is to contain adapted images.
- img_cache_uri: URI path to the cache folder.
- uri_mappings => The list of URI mappings to use to convert an absolute HTTP
URI to a local file. Mappings must be separated by a space. Each mapping
consists of a root URI and a root folder separated by a '|'.
Ex: http://example.com/img/|/var/www/img/
- max_image_size: maximum image size in bytes. Images that are still bigger
than this size after conversion are removed from the content.
This transcoding action does two jobs in practice:
- it resizes and saves the images that appear in the given HTML content.
Images are saved in the cache subfolder (the code must have write
access to that folder!)
- it updates the img tag definitions in the HTML content with the new
src, width and height attribute values.
Image formats that are not supported by the requesting device and that cannot be converted to another format are removed.
Located in /common/transcoding/transcodingactionresizeimg.php (line 73)
TranscodingAction
|
--TranscodingActionResizeIMG