spatie / statamic-responsive-images

Responsive images for Statamic 3
MIT License
99 stars 29 forks source link

Absolute URLs when using custom filesystem for image manipulations get converted into relative URLs #191

Closed ncla closed 1 year ago

ncla commented 1 year ago

Bug description

While testing #190, I discovered separate bug where if you set image manipulations to be stored in a custom filesystem that has URL prefix set, it will it strip out.

in config/filesystems.php

        'test' => [
            'driver' => 'local',
            'root' => storage_path('app'),
            'url' => env('APP_URL') . '/storage',
            'visibility' => 'public',
        ],

in config/statamic/assets.php

'image_manipulation' => [
    'cache' => 'test',
]

In GenerateGlideImageJob it forces any URL into a relative one with URL::makeRelative.

http://statamic-sandbox.test/storage/containers/assets/poster.jpg/93efe686bb0f4ef81528af00145253c0.webp

becomes

/storage/containers/assets/poster.jpg/93efe686bb0f4ef81528af00145253c0.webp

How to reproduce

-

Logs

No response

Environment

-

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Additional details

No response