Generate a list of file types for the as field given the extension.
Return value
array Returns an array of arrays.
1 call to advagg_preload_list()
- advagg_get_preload_info_from_url dans ./
advagg.module - Given a link get the as, type, and crossorigin attributes.
Fichier
-
./
advagg.module, line 6713
Code
function advagg_preload_list() {
$list = array(
'font' => array(
'woff2',
'woff',
'ttf',
'otf',
'eot',
// Need to check if the svg file is in a font folder.
'svg',
),
'image' => array(
'gif',
'jpg',
'jpeg',
'jpe',
'jif',
'jfif',
'jfi',
'png',
'webp',
'jp2',
'jpx',
'jxr',
'heif',
'heic',
'bpg',
'svg',
),
'style' => array(
'css',
),
'script' => array(
'js',
),
'video' => array(
'mp4',
'webm',
'ogg',
),
);
// Call hook_advagg_preload_list_alter()
drupal_alter('advagg_preload_list', $list);
return $list;
}