Media Library / Glide only loading JPEGs

Hey there, So I had a Laravel/Twill app running successfully on a subdomain with no issue. Today I needed to move it to the main domain to go live. This is a CPanel shared host server btw. So I moved everything over to a root folder named laravel-core and then the public folder, sitting separately as public_html After configuring everything to address the new paths, the site loads, but not the images coming from the Twill CMS. Well, not all of them. On looking at the Media Library in the CMS, What was working previously on the sub-domain, is that it seems that only image files as a JPEG were being successfully loaded via Glide/Twill in the /img/ route. As you can see in the screenshot, the Media Library, with the network requests to the right. Images as jpeg are successfully coming through Glide, successfully being manipulated, but only JPEGs. JPEG Example: https://shiftit.no/img/c8a9d6bf-0a49-4e16-9618-a42a250f02ef/6346c314aa282csswj.jpeg?fm=webp&q=60&auto=compress%2Cformat&fit=min&dpr=1&h=256 JPG Example: 404 error https://shiftit.no/img/60dabc39-b70d-432b-a7ee-43af0aaa966f/shiftit-home-feature-mix21.jpg?fm=webp&q=60&auto=compress%2Cformat&fit=min&dpr=1&h=256 I am absolutely baffled, I double checked I wasn't doing any extension filtering in the Glide/Twill settings, everything is pretty much default, out of the box settings. I've delete the Glide Cache etc, I am at a loss. Any help would be greatly appreciated !
No description
37 Replies
constantvariable.
Hello, have you done the symlink to the storage path on the new server ? php artisan storage:link
.ghostbane
.ghostbaneOP2y ago
I had to do it manually because the the command would not work, unsure if it was because of absolutele paths or whatnot
constantvariable.
Does it work if you upload a new jpg file ?
.ghostbane
.ghostbaneOP2y ago
No, the image doesn't load in the ML, but it uploads to the server I can access it via the storage url directly, but not through the Glide img
constantvariable.
Ok that must be a symlink problem, are you sure the symlink is good ? Alos, be sure to clean all the caches : php artisan optimize && php artisan route:clear && php artisan config:clear
.ghostbane
.ghostbaneOP2y ago
The symlink is working for everything else in the storage Also for JPEG files via /img/ Just not for other extensions, which is super weird Yes, I've done all the cache dumps
constantvariable.
Check also the glide config in your .env file
.ghostbane
.ghostbaneOP2y ago
FILE_LIBRARY_ENDPOINT_TYPE=local
MEDIA_LIBRARY_ENDPOINT_TYPE=local
MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide
FILE_LIBRARY_ENDPOINT_TYPE=local
MEDIA_LIBRARY_ENDPOINT_TYPE=local
MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide
constantvariable.
You can also define this: MEDIA_LIBRARY_LOCAL_PATH=uploads/
constantvariable.
GitHub
[Media Library] Filesystem Config not used - Invalid image url · Is...
Hi, i have currently the challenge, that the returned url values for images which has been uploaded locally. I configured the twill app as following: //.env APP_URL=twill.local ADMIN_APP_URL=twill....
.ghostbane
.ghostbaneOP2y ago
The /uploads path is on by default, and working correctly for the system path as far as I can tell. It is so bizarre, I can see in your link there, allowed_extensions, but I don't have that specifically set anywhere. I mean, the Media Library allows me to upload other formats.
ifox
ifox2y ago
there's no coupling between the formats you allow to upload and what glide can render the jpg/jpeg issue is really weird indeed
.ghostbane
.ghostbaneOP2y ago
I am absolutely baffled. Does the Artisan storage link command do anything outside of running a symlink creation loop based on what is in the links array from the filesystems config? Does Twill/Glide run anything additionally here?
ifox
ifox2y ago
nope, and the storage link is actually not needed for glide to work since it goes through a controller on the /img path what I suspect is the version of GD or Imagick in use by your cpanel host depending on how it's been compiled it could have this issue I guess
.ghostbane
.ghostbaneOP2y ago
It worked perfectly well on a subdomain on the same host. Bog standard Cpanel shared server. Had the app on a subdomain for months during reviewed development, moved it 'live' so to speak, and this issue arises.
ifox
ifox2y ago
very strange did you ask your hosting provider?
.ghostbane
.ghostbaneOP2y ago
Not yet, wanted to see if it was something that was seen before through here. I guess I could ask them to trace the process or whatever, but I'm unsure how much help they could shine on this.
ifox
ifox2y ago
is the derived image generated on the filesystem by glide?
.ghostbane
.ghostbaneOP2y ago
As in, is it physically uploaded?
ifox
ifox2y ago
I mean when you request it with /img do you see a new file under the glide_cache folder?
.ghostbane
.ghostbaneOP2y ago
No, it isn't there Just the JPEGs
ifox
ifox2y ago
did you try dd'ing your way into the glide controller?
.ghostbane
.ghostbaneOP2y ago
I have not went as far as that, but may give that a look tomorrow. Would this be the controller A17\Twill\Services\MediaLibrary\Glide ?
ifox
ifox2y ago
yes, but you'll need to drilldown into glide itself from there
ifox
ifox2y ago
GitHub
twill/GlideController.php at 861032e3c94965c59cc5c5d2ef2f1014b6e201...
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/c...
ifox
ifox2y ago
GitHub
twill/Glide.php at 7c030c6d315e679b51ee4de9537816e3a0f9abb1 · area1...
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/c...
ifox
ifox2y ago
GitHub
glide/Server.php at 0305fff66b2c427d41e8558385d235ce10230d85 · barr...
Wonderfully easy on-demand image manipulation library with an HTTP based API. - glide/Server.php at 0305fff66b2c427d41e8558385d235ce10230d85 · barryvdh/glide
.ghostbane
.ghostbaneOP2y ago
For reference, dd'ing the $path in the Glide controller,
No description
.ghostbane
.ghostbaneOP2y ago
Prints out a path for JPEG, anything else still presents a 404
.ghostbane
.ghostbaneOP2y ago
No description
.ghostbane
.ghostbaneOP2y ago
No description
.ghostbane
.ghostbaneOP2y ago
No description
.ghostbane
.ghostbaneOP2y ago
Made a small test with a jpg url to test the route matching,
.ghostbane
.ghostbaneOP2y ago
No description
.ghostbane
.ghostbaneOP2y ago
No description
.ghostbane
.ghostbaneOP2y ago
It is matching the correct route in the test with a jpg But for whatever reason, it won't do this with the actual url
Want results from more Discord servers?
Add your server