Open godismyjudge95 opened 1 year ago
You can work around this for now by checking for svgs and avoid using glide.
{{ if field_name:is_svg }}{{ url }}{{ else }}{{ glide:field_name }}{{ /if }}
Do you have anything set in your AWS_URL
.env variable? If I have a value in that then I get an absolute S3 path instead a relative one.
Do you have anything set in your
AWS_URL
.env variable? If I have a value in that then I get an absolute S3 path instead a relative one.
Yeah we do have that set... It's this code in particular that's the problem: https://github.com/statamic/cms/blob/4.x/src/Tags/Glide.php#L206
The problem is that the code defaults to not making the asset url not absolute which then takes the AWS asset url and removes the domain and scheme. But this only needs to happen when the url is to an asset on the current site url (ie. it shouldn't happen if the asset url is through another domain)
I attempted a PR to fix it, but ran into an issue - https://github.com/statamic/cms/pull/8901 I might take another swing at it soon.
Bug description
I was attempting to use S3 to store images and using glide to resize the images. This does not appear to work with SVG's however.
How to reproduce
Example of what is outputted:
Example of what should be outputted:
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
runtime (new)
Additional details
No response