As mentioned, the src’s for my images in a Laravel Statamic app on the digital ocean app platform just aren’t coming through. The alt text is there. These images work absolutely fine on local which I see as a common issue posted, I’ve tried all the fixes but none have worked for me.
-
Have ensured that all my asset disks have urls and are public
-
Have done storage:link
-
Have increased the php memory limit with user ini – and verified it worked
-
Set env variables for url, app key within Digital Ocean etc
-
Have NOT tried deleting the public storage folder as honestly, I don’t know how to do that on live through the console
I do think it’s an issue with the symlink in the file below, but I cannot figure out what is wrong with it. I’m sure it’s something simple but am banging my head against a wall figuring this out.
Any and all advice very welcome! Thanks!
Filesystems.php:
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DISK', 'images'),
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been set up for each driver as an example of the required values.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
'url' => '/images',
'visibility' => 'public',
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
'images' => [
'driver' => 'local',
'root' => public_path('images'),
'url' => '/images',
'visibility' => 'public',
],
'favicons' => [
'driver' => 'local',
'root' => public_path('favicons'),
'url' => '/favicons',
'visibility' => 'public',
],
'files' => [
'driver' => 'local',
'root' => public_path('files'),
'url' => '/files',
'visibility' => 'public',
],
'social_images' => [
'driver' => 'local',
'root' => public_path('social_images'),
'url' => '/social_images',
'visibility' => 'public',
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];
have you tried cache clear, php artisan cache:clear php please cache:clear , also check for file permissions . also debug the image path by printing it , may possibility of path issue
when you tried storage link did you run the command
php artisan storage:link
?