Hey there
I read a lot of posts and tried all the things that were proposed. Still not working as expected.
kirby version: 3.7.4
php 8.0.0
Problem:
My user/editors want to load big images/don’t want to care about the images sizes → so I make thumbs like this:
$bild->thumb(['width' => 1000])->url()
That produces, as expected, this:
background-image: url('http://localhost:8888/imag-url-1000x.jpg');
}
But the image is still the same size:
What I tried:
Change php to 7.4.3
Change php back to 8.0.0
Check for GD:
Write this in config.php:
'thumbs' => [
'driver' => 'im'
]
Is there something wrong with the Kirby version? Should I update? I don’t want to crash anything.
Related Posts I found and worked through:
I’m deploying Kirby on a Digital Ocean droplet (Ubuntu 20.04) running Apache. When I use the helper tag resize locally it works fine and creates image thumbnails under /media but when I run the site on production it only creates a .jobs folder in the /media directory.
So far I’ve tried:
Changing folder permissions to 755 and files to 644.
Deleting the /media folder on the server and letting it regenerate.
Here’s the code I’m using in my template:
<?php foreach($page->children()->paginate(20…
I just migrated a dev page to a live page and apparently the image->resize() function does not work anymore. PHP is set to 7.4.10 – my guess is that the hosting company hasn’t enabled the PHP proper module though. (Server API says FPM/FastCGI)
Phpinfo() is not showing any results when searching the page for “GD” (only the authors section) or when searching for “Imagick”.
Is Kirby using GD or Imagick so that I can ask the company for activating the proper module?
Thx!
Hi,
I’m having an issue with thumb creation on my remote server, but not on my localhost. My server is apache, running Ubuntu 16.04 and PHP 7.2.
If I upload more than a few larger images (my client has tried between 1–10mb), they are ‘generated’ as a thumb (and moved into the media folder), but keep their filesize and pixel size (e.g. a 1.5mb image will be the same size and width, despite using the following:
$slideImg->thumb(['width' => 2000, 'crop' => false, 'quality' => 80])
However on my…
(This I didn’t try, because it never works – not locally nor on a server)
Is there another idea how to solve this?
Note that imagick is not the same as imagemagick. So if you use the im
driver, you need to check if imagemagick is installed on the server
convert -v
Your server might not be able to handle huge images with its current settings.
Oh, it’s not? In the phpinfo file is nothing written about imagemagick except in that table I made the screenshot of.
How do I check for Imagemagick exactly?
Where do I type this?
convert -v
Your server might not be able to handle huge images with its current settings.
That could be! There are images like 3000x4000 px or 1200x900 px – not absurd huge images… I mean, that should not really be a problem, right?
Either way: I would change it like proposed here:
Hi,
I’m having an issue with thumb creation on my remote server, but not on my localhost. My server is apache, running Ubuntu 16.04 and PHP 7.2.
If I upload more than a few larger images (my client has tried between 1–10mb), they are ‘generated’ as a thumb (and moved into the media folder), but keep their filesize and pixel size (e.g. a 1.5mb image will be the same size and width, despite using the following:
$slideImg->thumb(['width' => 2000, 'crop' => false, 'quality' => 80])
However on my…
In the php ini file?
Ok, imageMagick was indeed not installed!
It is working now.
Luckily, it is an institution owned server, so they can simply install it.
But what would I do in case it is regular shared hosting?
Why is GD not working out??
Or is it usually common that shard hostings have imageMagick installed? Just confused that I never run into this issue before.
texnixe
October 21, 2022, 11:34am
6
Have you tried if gd works with smaller images? That would at least provide a pointer.
I tried it with a 26KB image on a local mamp without imagick / imageMagick installed.
I removed the
'thumbs' => [
'driver' => 'im'
],
from the config file.
There is no cropping, resizing happening whatsoever.
I don’t have an answer for you. Check that gd is enabled for the currently active PHP version (with MAMP, should usually be enabled)
And make sure that the dimensions of the image you are resizing are larger than your resize/cropping values.