Image/gallery-related issues after migration

I just migrated my Cockpit installation to a new server-- installed a fresh copy of version 0.12.2 and copied over the config and storage folders-- and I’m getting an error when saving a collection that I believe is related to an image gallery field. Note that I am also using @pauloamgomes ImageStyles addon to manage resizing sets of (responsive) images. In my “Projects” collection, I have an asset and gallery fields, both configured for multiple styles via the ImageStyles addon. When I save a collection I get the following error at the top of the screen:

get_resource_type(): Argument #1 ($resource) must be of type resource, GdImage given

And in the console, I see a POST error for /cockpit/collections/save_entry/projects 412 (Precondition Failed)

I figured this had to be a permissions related error, but I’ve set write privileges to both the config and storage folders, and I can see items being created in those folders. I never had any such issues on my other server (shared hosting) and I’m wondering if it could be related to configuration on my new one? (Digital Ocean LAMP droplet.) I should also note that my new server is running PHP 8, whereas my previous one was 7.3. It seems the issue derives from the ImageStyles addon, so I’m hopeful @pauloamgomes may have some thoughts (and I’d really like to keep using it as it’s an incredibly useful addon!)

Thank you for any insight here, and please let me know if I can provide any further information to diagnose the issue.

Just to post a follow-up on this: in troubleshooting I changed my server’s PHP version to 7.4 from 8 and it seems the image-related errors are gone. Not sure if there’s something in Cockpit or the ImageStyles addon that’s incompatible w/ PHP8?

Looks related to the GD extension. This is a very common PHP extension that is nearly always installed, but it is possible that your PHP 7.4 installation didn’t have it?

https://www.php.net/manual/en/image.installation.php

Thanks @andyvanee - I actually thought that might be the case, but I did have the GD extension installed w/ PHP 8. My sense is there’s a conflict with the ImageStyles addon and PHP8, but I haven’t been able to nail it down.