- Issue created by @Grevil
- 🇩🇪Germany Anybody Porta WestfalicaI agree. But we should first discuss how to solve this best, before starting any implementation, please. 
- Assigned to Anybody
- 🇮🇳India sj_baradiaHi @anybody, we can use \Drupal::service ('extension.list.module')->getPath('my_markdown_module)to get the relative path of the module.We can define it at the top of the php file or globally to use it according to our need. 
- 🇩🇪Germany GrevilChatGPT thinks this is the right regex to match the image url inside a markdown image decleration, feel free to test it out! /!\[.*?\]\((.*?)\)/
- 🇩🇪Germany Anybody Porta WestfalicaOk I think I first need to have a look here and eventually discuss this finally. Let's do it, when it's needed. 
- 🇩🇪Germany lrwebks Porta WestfalicaIf this is a relative URL NOT starting with / […] leave untouched I think this case should also be prefixed with the module path, as this would still give access to more folders than it should (security). /img.pngcould easily be something like/my-secret-module/secrets.png, which the markdown should not have access to.In my opinion the best approach to this would be to only allow relative URLs in one of these forms as these can all safely be redirected to the path within the module: image.pngorfolder/image.webp/image.jpgor/folder/image.svg./path.jpegor./folder/image.jfif