Fall Foundry
Articles Topics About

Statamic asset errors when testing on local network

February 3, 2023

Recently I was trying to view a Statamic site that I was developing on my local machine from an iPhone - I needed to check on some troublesome CSS. I was met with an ugly FileNotFound error. Strange.

A little bit of digging and I found the culprit - in trying to locate assets for thumbnail generation (I was using a Glide tag) Statamic compares storage locations, and includes the host in this comparison. Given that localhost was different to 192.168.whatever.something a FileNotFound was thrown.

The quick workaround was to change my .env file:

-APP_URL=http://localhost
+APP_URL=http://192.168.whatever.something

Categories

Statamic