Get Glide URL outside of Blade #7979
Unanswered
MtDalPizzol
asked this question in
Q&A
Replies: 2 comments 2 replies
-
You should be able to use it in the same way you can in Blade - Blade is still PHP. Is that not working for you? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I went the same route as @MtDalPizzol recommended, but you can do this the use Statamic\Facades\Asset;
$asset = Asset::query()
->where('container', 'assets')
->first();
$params = [
'w'=>'100'
];
dd($asset->manipulate($params)); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Inertia for my frontend which leaves me without some Statamic goodies.
One of them, is that since I'm not using Blade, I need to get the URLs for Glide images outside of my views, in my controllers and other points of the code before sending them to Vue to be rendered.
I couldn't find how to do this in the docs, but I can see that Statamic has an
Image
and aGlide
Facades
.Can someone provide some resource that helps with that?
Beta Was this translation helpful? Give feedback.
All reactions