Are these images existing at web-root from there going /img/carousel and so on? Then using imageConfig on the real files might help. You load the images, then you got plenty of properties on the file object including relative links.
If the files are within a page bundle then you probably need to change your short code to work with page ressouces. Those again have plenty of properties which will help with links.
Sorry about that. I did not mean imageConfig, but readFile. I used both functions in the same context in my template and just confused them up.
Have a look at this page:
When you range through the files you get these properties here:
I think the example in the first link might even fit perfectly to your shortcode. You could just give it a path and then name the files alphabetically so they are loaded in the order you prefer.
The “don’t want dotted URLs”: You should prefer paths from your webroot, like “/images/something/image.jpg” instead of “…/…/images/something/image.jpg”. Apart from the first version being a bit shorter - if you move the file up one level or down one level your dotted navigation breaks. the absolute will always go from domain root, as long as you have a ‘/’ in the beginning.
Ok I now know the obvious reason why I used relativeURLs = true and “dotted” relative URLs in the first place: I deploy this documentation in different environments (staging, prod), and using absolute URLs means I’d have to make a new build for each one (which defeats the idea of having different environments).
Also what I ended up doing is to generate the “…/…/…/” prefix up to the root, based on the page’s .RelPermalink, which I apply to the list of URLs passed as params to the shortcode: