I have been having a lot of issues concerning images using Voyager on heroku.
Install laravel voyager on heroku.
Symlink is required for the media library to work properly at the moment.
However we are open for pull requests making the media go directly into the public path instead of the storage path.
This will make it possible to use without symlink support.
About the GD driver not being available, then try this.
I believe the storage folder is needed when we want to support other storage method such as AWS?
Hello all,
I'm also facing issues with symlink storage in Heroku.
Laravel Version: 5.4
Voyager Version: 0.11.10
I'm not quite sure about PHP's version. Heroku shows 7.1.3 when asked with the php -v command on Heroku bash, however composer.json is set up like this:
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"tcg/voyager": "^0.11.10"
},
The message I'm getting is:
"Missing storage symlink
We could not find a storage symlink. This could cause problems with loading media files from the browser."
If I hit "Fix it", it just takes me to mysubdomain.herokuapp.com/admin?fix-missing-storage-symlink=1 with the "Whoops, looks like something went wrong." and I don't see any thing related on the "Heroku logs".
I've tried unsuccessfully the:
ln -s storage/app/public public/storage
After creating the symbolic link, this is what I see on the Heroku's bash:
~ $ pwd
pwd
/app
~ $ ls -la public
ls -la public
total 44
drwx------ 6 u43622 dyno 4096 May 23 00:21 .
drwx------ 15 u43622 dyno 4096 May 22 23:05 ..
-rw------- 1 u43622 dyno 553 May 22 21:45 .htaccess
drwx------ 2 u43622 dyno 4096 May 22 21:45 css
-rw------- 1 u43622 dyno 0 May 22 21:45 favicon.ico
drwx------ 3 u43622 dyno 4096 May 22 20:46 fonts
-rw------- 1 u43622 dyno 1783 May 22 21:45 index.php
drwx------ 2 u43622 dyno 4096 May 22 21:45 js
-rw------- 1 u43622 dyno 66 May 22 20:46 mix-manifest.json
-rw------- 1 u43622 dyno 24 May 22 21:45 robots.txt
lrwxrwxrwx 1 u43622 dyno 18 May 23 00:21 storage -> storage/app/public
drwx------ 3 u43622 dyno 4096 May 22 21:45 vendor
-rw------- 1 u43622 dyno 914 May 22 21:45 web.config
~ $
However issue persists, meaning I'm still getting the yellow alert about "Missing storage symlink".
I understand this is something you are still working on.
In the meantime, is there a workaround other than editing VoyagerServiceProvider.php to avoid the yellow alert and forget about those images?
Regards,
Alvaro
hello, I also need help on this, its been a year now
None of us maintainers actively use Heroku, so it's hard for us to test it on that platform. This is still open because we've been unable to test it and are waiting for someone else to come up with the solution.
Your issue indicates that the symlink isn't being acknowledged. (I'm assuming it's there). This indicates an issue with the webserver configuration (e.g. apache has Options FollowSymLinks). If Heroku denies this, then there is nothing Voyager can do for you. Unfortunately, this really isn't much of a Voyager issue as it is a Laravel-on-Heroku one. Voyager just makes use of Laravel's functionality.
I'm not going to close this since I'm curious what the solution ends up being, but I also can't actively support it other than to respond to information you (or others) provide.
I've had success with Voyager on Heroku. You have to use S3 for storage, because the heroku filesystem is read-only. There's a slight complication in that Voyager relies on the public disk, so you have to rename your S3 storage to "public" in your filesystem config, like so:
'public' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],
As for image processing, you can enable GD by adding a few lines to composer.json, as detailed in this Stack Overflow post:
https://stackoverflow.com/questions/27380365/heroku-how-to-enable-gd-on-heroku-php-application
@ibonly @Ra1da35ma can you confirm that @luckyrabbitllc solution works for you?
@luckyrabbitllc, Voyager doesn't technically REQUIRE the public disk. It only uses it as the default value. You can change which disk is used here: https://github.com/the-control-group/voyager/blob/1.0/publishable/config/voyager.php#L69
@fletch3555 Glad to hear that! I think at the time that I faced this problem, there were a few lines where the default disk was hardcoded. Hopefully they all use the config variable now? Can't remember where they were off the top of my head.
I believe it's only used in 1-2 places, but yes they should all use this config now. I don't remember exactly when that config was added, but it's been there for a long time.
I'm going to close this now, since it's not really a Voyager issue, and a solution has been provided.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
Symlink is required for the media library to work properly at the moment.
However we are open for pull requests making the media go directly into the public path instead of the storage path.
This will make it possible to use without symlink support.
About the
GDdriver not being available, then try this.