if (!
isset($src['alt'
])) { $src['alt'
] =
$attributes['alt'
] ?? '';
} $img = '<img';
// Check for a relative URI
if (!
preg_match('#^([a-z]+:)?//#i',
$src['src'
]) &&
strpos($src['src'
], 'data:'
) !== 0
) { if ($indexPage === true
) { $img .= ' src="' .
site_url($src['src'
]) . '"';
} else { $img .= ' src="' .
slash_item('baseURL'
) .
$src['src'
] . '"';
} unset($src['src'
]);
} // Append any other values
foreach ($src as $key =>
$value) { $img .= ' ' .
$key . '="' .
$value . '"';
} // Prevent passing completed values to stringify_attributes