.. include:: /Includes.rst.txt .. _typo3-fluid-media: ============================ media ViewHelper `` ============================ Render a given media file with the correct html tag. It asks the :php:`RendererRegistry` for the correct Renderer class and if not found it falls back to the :php:`ImageViewHelper` as that is the "Renderer" class for images in Fluid context. Examples ======== Image Object ------------ :: Output:: alt set in image record MP4 Video Object ---------------- :: Output:: MP4 Video Object with loop and autoplay option set -------------------------------------------------- :: Output:: .. _typo3-fluid-media_arguments: Arguments ========= .. _media_additionalattributes: additionalAttributes -------------------- :aspect:`DataType` mixed :aspect:`Required` false :aspect:`Description` Additional tag attributes. They will be added directly to the resulting HTML tag. .. _media_data: data ---- :aspect:`DataType` mixed :aspect:`Required` false :aspect:`Description` Additional data-* attributes. They will each be added with a "data-" prefix. .. _media_aria: aria ---- :aspect:`DataType` mixed :aspect:`Required` false :aspect:`Description` Additional aria-* attributes. They will each be added with a "aria-" prefix. .. _media_class: class ----- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` CSS class(es) for this element .. _media_dir: dir --- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left) .. _media_id: id -- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Unique (in this file) identifier for this HTML element. .. _media_lang: lang ---- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Language for this element. Use short names specified in RFC 1766 .. _media_style: style ----- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Individual CSS styles for this element .. _media_title: title ----- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Tooltip text of element .. _media_accesskey: accesskey --------- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Keyboard shortcut to access this element .. _media_tabindex: tabindex -------- :aspect:`DataType` integer :aspect:`Required` false :aspect:`Description` Specifies the tab order of this element .. _media_onclick: onclick ------- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` JavaScript evaluated for the onclick event .. _media_alt: alt --- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Specifies an alternate text for an image .. _media_file: file ---- :aspect:`DataType` mixed :aspect:`Required` true :aspect:`Description` File .. _media_additionalconfig: additionalConfig ---------------- :aspect:`DataType` mixed :aspect:`Default` array () :aspect:`Required` false :aspect:`Description` This array can hold additional configuration that is passed though to the Renderer object .. _media_width: width ----- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` This can be a numeric value representing the fixed width of in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options. .. _media_height: height ------ :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` This can be a numeric value representing the fixed height in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options. .. _media_cropvariant: cropVariant ----------- :aspect:`DataType` string :aspect:`Default` 'default' :aspect:`Required` false :aspect:`Description` Select a cropping variant, in case multiple croppings have been specified or stored in FileReference .. _media_fileextension: fileExtension ------------- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Custom file extension to use for images .. _media_loading: loading ------- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Native lazy-loading for images property. Can be "lazy", "eager" or "auto". Used on image files only. .. _media_decoding: decoding -------- :aspect:`DataType` string :aspect:`Required` false :aspect:`Description` Provides an image decoding hint to the browser. Can be "sync", "async" or "auto"