From 6bdc3e39584f5dd9cfdeeb83d7da4595021c50a4 Mon Sep 17 00:00:00 2001 From: viglino Date: Mon, 30 Sep 2024 11:00:27 +0200 Subject: [PATCH] [UPD] handle user media Anomalie-19935 --- md/mdDiaporama.js | 3 ++- md/mdImageSlider.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/md/mdDiaporama.js b/md/mdDiaporama.js index 17ba7c6..7c981ab 100644 --- a/md/mdDiaporama.js +++ b/md/mdDiaporama.js @@ -1,4 +1,5 @@ import ol_ext_element from "ol-ext/util/element"; +import { getMediaURL } from "mcutils/api/serviceURL"; import './mdDiaporam.css' @@ -46,7 +47,7 @@ function prepareDiaporama(type, data) { atts.img.forEach((img, i) => { if (img) { ol_ext_element.create('IMG', { - src: img, + src: getMediaURL(img), className: 'diapo', parent: diapo }); diff --git a/md/mdImageSlider.js b/md/mdImageSlider.js index 38014dc..6e2426d 100644 --- a/md/mdImageSlider.js +++ b/md/mdImageSlider.js @@ -1,4 +1,5 @@ import ol_ext_element from "ol-ext/util/element"; +import { getMediaURL } from "mcutils/api/serviceURL"; import './mdImageSlider.css' @@ -54,7 +55,7 @@ function createElement(content, atts, width, height) { }) // First image ol_ext_element.create('IMG', { - src: atts.img1, + src: getMediaURL(atts.img1), className: 'md-img-1', style: { width: width ? width + 'px' : 'auto', @@ -74,7 +75,7 @@ function createElement(content, atts, width, height) { // Second image ol_ext_element.create('IMG', { className: 'md-img-2', - src: atts.img2, + src: getMediaURL(atts.img2), parent: element }) return element