i’m been working on my site locally (on a mac) and my images show up but are broken on my edit: hosting server (hosted on krystal.io). There are two instances of this not working properly— the first being the noise.gif i am using in the background of my website pages, and image profiles on members page.
2. Member profiles:
The image links show up when the user selects the avatar option, making me wonder if it’s the resize(400,400) that’s causing the error.
I use Krystal hosting. Which image dirver are you using in the config? The default will be GD, i would reccommend using IM if you want to manipulate animated gifs with kirby. GD cant do that, you will end up with a resized gif but just the very first frame. You will loose the animation. IM can resize animated gifs AND keep the animation in the resulting file.
Make sure IM is turned on in the php settings in your cPanel account and set Kirby config to use IM as the image driver. the following should work:
I just noticed that the images in your member directory are webp images and hitting one of them directly causes a Kirby whoops. If you temporarily enable debug mode on the live server to read the error, that would maybe give. aclue as to what is going on. Remember to turn ir back on again for security reasons.
I removed the format: webp i had set on the member-image yml, and then tried to swap in image files from the live site’s admin panel. It throws an error “Required extension GD is not loaded.” on the image upload when i try both .png and .jpg
I’m new to coding in php and am not entirely sure what Image driver and GD/ IM mean, i skimmed through the php docs but would be able to help point me to what might be happening?
As well, following up on your first note – can i clarify, i’m adding this block code to my config file site/config /config.php ? And i wasn’t sure where to change the Image drive setting in my cPanel.
Ok so this is server side software that is not part of Kirby, this is something that is installed on the server by Krystal. GD is the default on 99.99% of hosting providers, not just Krystal. An alternative (and in my opinion the better option as its results are better then GD) is ImageMajick or IM for short.
It is really odd that GD isnt loaded. What hosting plan do you have with Krystal?
Yes you have added the code to the correct file in the config.php file. If you go into the “Select PHP version“ under the software group in cPanel and look at the list of extensions. Make sure imagick and gd are enabled. If t still doesnt work after that, i would contact Krystal support and ask them to verify that IM and GD are setup correct. For reference, here are my own settings on Krystal…
If you want to use IM locally as well, assuming your on a mac, the best way is to install ImageMagick via Homebrew and then use Kirby multiple domain configs to handle the difference between local and live servers. I use config.php to drive local hosting and global stuff.
In the live/staging domain specfic configs i overide the thumbs setting to set the bin to the imagemagick binary to a different path.
After setting up domain configs your local config should have: