diff --git a/Model/Plugins/Store/Model/Store.php b/Model/Plugins/Store/Model/Store.php
index 3ae6a81..afa499e 100644
--- a/Model/Plugins/Store/Model/Store.php
+++ b/Model/Plugins/Store/Model/Store.php
@@ -53,7 +53,11 @@ public function afterGetBaseUrl(
'smimageoptimization/general/image_engine_url',
ScopeInterface::SCOPE_STORE
);
- $baseUrl = $baseUrl . '/media/';
+ $mediaPath = $this->scopeConfig->getValue(
+ 'smimageoptimization/general/media_path',
+ ScopeInterface::SCOPE_STORE
+ );
+ $baseUrl = $baseUrl . $mediaPath;
}
return $baseUrl;
diff --git a/README.md b/README.md
index 9767852..3c383da 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,12 @@ Follow the guide in the [official ImageEngine documentation](https://support.ima
# Change Log
+### Version : V1.0.23
+- Fixed hardcoded media path.
+- Added new config text field for dynamic media folder.
+- Added validation for address URL.
+
+
### Version : V1.0.22
- **Fixed:** Update client hint headers issue [#13](https://github.com/WURFL/magento-imageengine-extension/issues/13)
- Issue solved for `img-src`,`script` and `style` are controlled with a content security policy.
diff --git a/composer.json b/composer.json
index 4b25181..79fad07 100755
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
"require": {
"php": "~7.1.0|~7.2.0|~7.3.0|~7.4.0|~8.1.0"
},
- "version": "1.0.22",
+ "version": "1.0.23",
"license": "MIT",
"type": "magento2-module",
"autoload": {
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index 7a728bc..8e72526 100755
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -6,7 +6,7 @@
-->
-
+
@@ -21,10 +21,17 @@
Magento\Config\Model\Config\Source\Yesno
-
- This url will change unsecure/base_media_url and secure/base_media_url.
+
+ Enter the complete delivery address including `https://`.
+ required-entry validate-url
+
+
+
+ Make sure you have add Media folder name and it start & end with '/' (slash) e.g. '/media/.']]>
+ required-entry
+
diff --git a/etc/config.xml b/etc/config.xml
index 31ef880..a32f0d5 100755
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -12,7 +12,8 @@
+ /media/
-
\ No newline at end of file
+