-
Notifications
You must be signed in to change notification settings - Fork 25
Description
When running the static site generator, glide images are generated directly in storage/app/static/....
, but glide:data_url
attempts to read the generated image from storage/statamic/glide
.
If you have been viewing the site in a local browser, the cached images will coincidently be present in storage/statamic/glide
, creating the illusion that glide:data_url is working. However, if the glide cache is cleared prior to running php please ssg:generate
, then errors will be produced and the data urls will be blank.
I added some logging to the filesystem to report every file read and write. Here is an extract from an example project showing the write and following read from different paths.
[2025-07-07 09:57:49] local.INFO: Write File ["/Users/me/dev/clients/example.co.uk/storage/app/static/img/containers/assets/design/logo-design.png/24f5efe8bef890830bfe16b2d1cba72d/logo-design.webp"]
[2025-07-07 09:57:49] local.INFO: read file ["/Users/me/dev/clients/example.co.uk/storage/statamic/glide/containers/assets/design/logo-design.png/24f5efe8bef890830bfe16b2d1cba72d/logo-design.webp"]
[2025-07-07 09:57:49] local.ERROR: Unable to read file from location: containers/assets/design/logo-design.png/24f5efe8bef890830bfe16b2d1cba72d/logo-design.webp.
Steps to reproduce.
- Add a
{{ glide:data_url }}
tag to an antlers view php please glide:clear
php please ssg:generate
- Notice that there is no data url in the generated html files
- Notice the error 'Unable to read file from location: ' in the Laravel log file
Support details
Environment
Application Name: Example
Laravel Version: 12.19.3
PHP Version: 8.4.8
Composer Version: 2.8.9
Environment: local
Debug Mode: ENABLED
URL: example.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Statamic
Addons: 2
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.58.1 Solo
Statamic Addons
statamic/seo-pro: 6.7.0
statamic/ssg: 3.1.1