Skip to content

Conversation

matdave
Copy link

@matdave matdave commented Oct 24, 2023

I've added a trim statement to the URL to help with external image sources. These return with the base URL prepended when grabbed from the media browser.

@Jako
Copy link
Owner

Jako commented Nov 2, 2023

Thank you! Since I can't test this here, I'll have to rely on your suggestion. Does this touch any other media source types?

@Jako
Copy link
Owner

Jako commented Feb 21, 2024

I don't think that the regex is right in your patch. It trims multiple baseUrls on the left from the src. This is maybe right, if the baseUrl value of the mediasource contains only a slash, but not if it contains i.e. slashes and a cultureKey.

Can you give an example for the input and the result? Is it ok to trim only a single value?

@matdave
Copy link
Author

matdave commented Feb 22, 2024

It may be wrong. It's just what I threw on a site to make it work 🤣. Example on the site was the src returns https://s3.site.com/path/to/image.jpg. and it was outputting https://s3.site.com/https://s3.site.com/path/to/image.jpg with ImagePlus

@Jako Jako marked this pull request as draft May 25, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants