#11202 Fixed url icon

This commit is contained in:
Daniel Maya 2023-05-17 14:56:00 +02:00
parent a3c7bdb655
commit be0f77b782
2 changed files with 12 additions and 2 deletions

View File

@ -3173,7 +3173,12 @@ function visual_map_get_image_status_element($layoutData, $status=false)
if ($layoutData['type'] == 5) {
// ICON ELEMENT.
$img .= '.png';
$url = parse_url($layoutData['image']);
if (isset($url['scheme']) === false) {
$img .= '.png';
} else {
$img = $layoutData['image'];
}
} else {
if ($status === false) {
$status = visual_map_get_status_element($layoutData);

View File

@ -116,7 +116,12 @@ final class Icon extends Item
// Get the img src.
$imagePath = \visual_map_get_image_status_element($data);
$data['imageSrc'] = \ui_get_full_url($imagePath, false, false, false);
$url = parse_url($imagePath);
if (isset($url['scheme']) === false) {
$data['imageSrc'] = \ui_get_full_url($imagePath, false, false, false);
} else {
$data['imageSrc'] = $imagePath;
}
// If the width or the height are equal to 0 we will extract them
// from the real image size.