New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Glide, Localisation and 'above webroot'

Richard Verbruggen June 11, 2019 by Richard Verbruggen

I've a statamic setup with multiple locales and with a public/ folder. Which works like a charm, content wise that is. Except for the images going through glide.

They produce an url like this: /img/assets/some-image.jpg?w=1600&h=1200 Which resolves like normal for the default locale.

But for the localized version it produces an url like: /de/img/assets/some-image.jpg?w=1600&h=1200 Which results in a 404-error.

The file itself on /assets/some-image.jpg?w=1600&h=1200 is valid and produces a nice (large) image.

In the documentation I read I need to "create a symlink from your /$locale/image_manipulation_cached_path to image_manipulation_cached_path" hence the 404 warning.

But where can I do this? And is this a rewrite rule in nginx? How would this be propagated through to Valet?

Any ideas on how to tackle this annoying problem? Or am I doing something completely wrong concerning these assets here :)

Answered by Richard Verbruggen!
>>>>>>> Answered <<<<<<<
4 Replies